From eedb4c638a1d1a2e12e1723a50d27ab645477291 Mon Sep 17 00:00:00 2001 From: Robin Stuart Date: Sun, 21 Aug 2016 21:58:38 +0100 Subject: [PATCH] Expand symbol memory to allow biggest Han Xin without crashing --- backend/dotcode.c | 2 +- backend/zint.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/dotcode.c b/backend/dotcode.c index 00194b4a..1427f9c5 100644 --- a/backend/dotcode.c +++ b/backend/dotcode.c @@ -1083,7 +1083,7 @@ int dotcode(struct zint_symbol *symbol, unsigned char source[], int length) { } } - if ((height > 177) || (width > 177)) { + if ((height > 200) || (width > 200)) { strcpy(symbol->errtxt, "Specified symbol size is too large"); return ZINT_ERROR_INVALID_OPTION; } diff --git a/backend/zint.h b/backend/zint.h index 82e6f3e3..7cb73081 100644 --- a/backend/zint.h +++ b/backend/zint.h @@ -87,8 +87,8 @@ extern "C" { int rows; int width; char primary[128]; - unsigned char encoded_data[178][143]; - int row_height[178]; /* Largest symbol is 177x177 QR Code */ + unsigned char encoded_data[200][143]; + int row_height[200]; /* Largest symbol is 189 x 189 Han Xin */ char errtxt[100]; char *bitmap; int bitmap_width;