From 81cadc3cf9b05413c431c953cae603214590416c Mon Sep 17 00:00:00 2001 From: Boris Zentner Date: Sun, 29 Jan 2017 11:21:15 +0100 Subject: [PATCH] Fix buffer over run, source is similar to local_source but smaller. So it might be possible to find a plus character in random data behind source. --- backend/upcean.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/upcean.c b/backend/upcean.c index 4ee62fcc..68508a4e 100644 --- a/backend/upcean.c +++ b/backend/upcean.c @@ -753,8 +753,8 @@ int eanx(struct zint_symbol *symbol, unsigned char source[], int src_len) { ean_leading_zeroes(symbol, source, local_source); - if (source[reader] == '+') { for (reader = 0; reader < ustrlen(local_source); reader++) { + if (local_source[reader] == '+') { with_addon = TRUE; } }