Config: Low the maximum size being checked for, to see if this fixes the warning.
This commit is contained in:
@@ -856,12 +856,12 @@ load_image_file(char *dest, char *p, uint8_t *ui_wp)
|
||||
prefix = "wp://";
|
||||
|
||||
if (path_abs(p)) {
|
||||
if ((strlen(prefix) + strlen(p)) > (MAX_IMAGE_PATH_LEN - 1))
|
||||
if ((strlen(prefix) + strlen(p)) > (MAX_IMAGE_PATH_LEN - 11))
|
||||
ret = 1;
|
||||
else
|
||||
snprintf(dest, MAX_IMAGE_PATH_LEN, "%s%s", prefix, p);
|
||||
} else {
|
||||
if ((strlen(prefix) + strlen(usr_path) + strlen(path_get_slash(usr_path)) + strlen(p)) > (MAX_IMAGE_PATH_LEN - 1))
|
||||
if ((strlen(prefix) + strlen(usr_path) + strlen(path_get_slash(usr_path)) + strlen(p)) > (MAX_IMAGE_PATH_LEN - 11))
|
||||
ret = 1;
|
||||
else
|
||||
snprintf(dest, MAX_IMAGE_PATH_LEN, "%s%s%s%s", prefix, usr_path, path_get_slash(usr_path), p);
|
||||
|
||||
Reference in New Issue
Block a user