From f121cf65acff71e59acd86b1357bad751cd8da0b Mon Sep 17 00:00:00 2001 From: hooper114 Date: Sun, 31 May 2009 21:10:34 +0000 Subject: [PATCH] Trap out of range values - Databar Limited --- backend/rss.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/backend/rss.c b/backend/rss.c index 077972d3..196b383c 100644 --- a/backend/rss.c +++ b/backend/rss.c @@ -669,6 +669,12 @@ int rsslimited(struct zint_symbol *symbol, unsigned char source[]) strcpy(symbol->errtxt, "Invalid characters in data"); return error_number; } + if(ustrlen(source) == 13) { + if((source[0] != '0') && (source[0] != '1')) { + strcpy(symbol->errtxt, "Input out of range"); + return ERROR_INVALID_DATA; + } + } /* make some room for a separator row for composite symbols */ if(symbol->symbology == BARCODE_RSS_LTD_CC) {