mirror of
https://git.code.sf.net/p/zint/code
synced 2026-05-14 18:13:53 +00:00
raster/vector: EAN/UPC: fix calculation of image/vector height to
allow for heights smaller than `textoffset` when have add-on (buffer overflow for raster, outside vector height for vector) raster: EAN/UPC: make sure don't overwrite add-on stuff when line-copying guard descenders by limiting copy width ZBarcode_Encode_Segs: allow for multiple (stacked) rows when setting absolute minimum height; state stacked symbols max in error message DBAR_EXP: check length on encoding method 6 before trying to parse 3-digit currency string with `z_to_int()` CLI: stop looping over data args when have error; suppress taint warning by using fixed `malloc()` size for `arg_opts` instead of `argc` general: use `vsnprintf()` instead of `vsprintf()` if not C89 ULTRACODE: don't call `ult_generate_codewords()` if `length` 0 from fragment processing (avoids `assert()`) clang-tidy -> 23 & suppress some warnings test suite: fuzz: leave Z_FUZZ_DEBUG to compiler, fix comment general: some minor code-formatting on touched files README.deb -> README.debian (avoid confusion with actual ".deb") BWIPP: update to latest
This commit is contained in:
@@ -55,10 +55,13 @@ static int gs1_err_msg_cpy_nochk(char err_msg[50], const char *msg) {
|
||||
ZINT_FORMAT_PRINTF(2, 3) static int gs1_err_msg_printf_nochk(char err_msg[50], const char *fmt, ...) {
|
||||
va_list ap;
|
||||
int size;
|
||||
|
||||
va_start(ap, fmt);
|
||||
|
||||
#ifdef ZINT_IS_C89
|
||||
size = vsprintf(err_msg, fmt, ap);
|
||||
#else
|
||||
size = vsnprintf(err_msg, 50, fmt, ap);
|
||||
#endif
|
||||
|
||||
(void)size;
|
||||
assert(size >= 0);
|
||||
|
||||
Reference in New Issue
Block a user