1
0
Fork 0
mirror of https://git.code.sf.net/p/zint/code synced 2025-05-31 23:28:27 -04:00

composite: fix buffer overflow for large linear, small composite (500 -> 1000)

composite: clear errtxt when bumping from CC-A -> CC-B -> CC-C
composite: CC-C adjustment 53 -> 52 (same as BWIPP) with proper explanation
composite: remove unneeded > 11805 length check
CODEONE: remove unneeded extended ASCII check in C40 count
GS1_128/CODE16K: remove unneeded initial GS1 mode '[' check
PDF417: remove unneeded second option_2 > 30 check
Document some "Not reached" lines (code coverage)
Update bwipp_dump.ps
GUI: window/tab height +5 so 2 full lines for composite edit box (Ubuntu)
manual: dash -> hyphen, PDF417 "check digit" -> "error correction", DMRE ref
tests: further test cases for CODEONE/CODE16K/common/composite/DATAMATRIX/
DOTCODE/gs1/MAXICODE/PDF417/postal/QRCODE
This commit is contained in:
gitlost 2021-08-05 16:34:45 +01:00
parent f0bfb8d920
commit b015e38da0
28 changed files with 3610 additions and 2019 deletions
backend

View file

@ -305,7 +305,7 @@ INTERNAL int c39(struct zint_symbol *symbol, unsigned char source[], int length)
width = (C + 2) * (3 * N + 6) * X + (C + 1) * I = (C + 2) * 9 + C + 1) * X = (10 * C + 19) */
height = (float) ((10.0 * (symbol->option_2 == 1 ? length + 1 : length) + 19.0) * 0.15);
/* Using 50 as default as none recommended */
error_number = set_height(symbol, height , height > 50.0f ? height : 50.0f, 0.0f, 0 /*no_errtxt*/);
error_number = set_height(symbol, height, height > 50.0f ? height : 50.0f, 0.0f, 0 /*no_errtxt*/);
}
#else
height = 50.0f;