mirror of
https://git.code.sf.net/p/zint/code
synced 2025-12-18 10:27:09 +00:00
CLI: validate_int: just fail if length > 9
This commit is contained in:
@@ -207,7 +207,7 @@ static int validate_int(const char source[], int *p_val) {
|
||||
int length = (int) strlen(source);
|
||||
|
||||
if (length > 9) { /* Prevent overflow */
|
||||
length = 9;
|
||||
return 0;
|
||||
}
|
||||
for (i = 0; i < length; i++) {
|
||||
if (source[i] < '0' || source[i] > '9') {
|
||||
|
||||
Reference in New Issue
Block a user