From: Chip Black Date: Mon, 29 Apr 2013 07:07:52 +0000 (-0500) Subject: Error when fetching tags and direction isn't 1 or -1 X-Git-Tag: v1.8~5 X-Git-Url: http://git.bytex64.net/?a=commitdiff_plain;h=e35e2482b85c6e7bbac334a8496472a8b7b0d170;hp=e01bce7710b1b70b003a2cccc8483fcda3d72014;p=blerg.git Error when fetching tags and direction isn't 1 or -1 --- diff --git a/database/tags.c b/database/tags.c index dc6bac8..0d7a27f 100644 --- a/database/tags.c +++ b/database/tags.c @@ -106,6 +106,11 @@ struct blergref * tag_list(const char *tag, uint64_t offset, int *count, int dir if (!valid_tag_name(tag + 1)) return NULL; + + if (!(direction == 1 || direction == -1)) { + fprintf(stderr, "Invalid direction: %d\n", direction); + return NULL; + } switch(tag[0]) { case '#':