CODABLOCKF: prevent cols > 62; fix pTestList buffer overflow

RMQR: update to new draft ISO/IEC JTC1/SC31N000 (Draft 2019-6-24);
  allow for righthand vertical timing pattern in populate_grid()
ULTRA: update max size and min cols based on BWIPP 2021-07-14 update
backend_tcl/zint_tcl.dsp: use /MD instead of /MT for tcl lib compat;
  change include/lib path to more standard one
manual.txt: highlight that rMQR is still in development
GUI: use cross-platform smaller font func instead of explicit values for notes
This commit is contained in:
gitlost
2021-08-10 12:04:25 +01:00
parent 4d0fff7cf5
commit 14d1140d09
49 changed files with 1828 additions and 739 deletions

View File

@ -272,7 +272,7 @@ INTERNAL int korea_post(struct zint_symbol *symbol, unsigned char source[], int
}
zeroes = 6 - length;
memset(localstr, '0', zeroes);
strcpy(localstr + zeroes, (char *) source);
ustrcpy(localstr + zeroes, source);
total = 0;
for (loop = 0; loop < 6; loop++) {
@ -290,7 +290,7 @@ INTERNAL int korea_post(struct zint_symbol *symbol, unsigned char source[], int
}
lookup(NEON, KoreaTable, localstr[6], dest);
expand(symbol, dest);
ustrcpy(symbol->text, (unsigned char*) localstr);
ustrcpy(symbol->text, localstr);
// TODO: Find documentation on BARCODE_KOREAPOST dimensions/height
@ -492,7 +492,7 @@ INTERNAL int kix_code(struct zint_symbol *symbol, unsigned char source[], int le
return error_number;
}
strcpy(localstr, (char *) source);
ustrcpy(localstr, source);
/* Encode data */
for (i = 0; i < length; i++) {
@ -540,8 +540,8 @@ INTERNAL int daft_code(struct zint_symbol *symbol, unsigned char source[], int l
strcpy(symbol->errtxt, "492: Input too long (50 character maximum)");
return ZINT_ERROR_TOO_LONG;
}
to_upper((unsigned char*) source);
error_number = is_sane(DAFTSET, (unsigned char*) source, length);
to_upper(source);
error_number = is_sane(DAFTSET, source, length);
if (error_number == ZINT_ERROR_INVALID_DATA) {
strcpy(symbol->errtxt, "493: Invalid character in data (\"D\", \"A\", \"F\" and \"T\" only)");
@ -632,9 +632,9 @@ INTERNAL int japan_post(struct zint_symbol *symbol, unsigned char source[], int
char inter[23];
#ifndef _MSC_VER
char local_source[length + 1];
unsigned char local_source[length + 1];
#else
char* local_source = (char*) _alloca(length + 1);
unsigned char *local_source = (unsigned char *) _alloca(length + 1);
#endif
if (length > 20) {
@ -642,10 +642,10 @@ INTERNAL int japan_post(struct zint_symbol *symbol, unsigned char source[], int
return ZINT_ERROR_TOO_LONG;
}
strcpy(local_source, (char*) source);
to_upper((unsigned char*) local_source);
ustrcpy(local_source, source);
to_upper(local_source);
if (is_sane(SHKASUTSET, (unsigned char*) local_source, length) == ZINT_ERROR_INVALID_DATA) {
if (is_sane(SHKASUTSET, local_source, length) == ZINT_ERROR_INVALID_DATA) {
strcpy(symbol->errtxt, "497: Invalid character in data (alphanumerics and \"-\" only)");
return ZINT_ERROR_INVALID_DATA;
}