Config: Low the maximum size being checked for, to see if this fixes the warning.

This commit is contained in:
OBattler
2025-08-10 22:50:20 +02:00
parent 8eefb0fe95
commit 84d50733d1

View File

@@ -856,12 +856,12 @@ load_image_file(char *dest, char *p, uint8_t *ui_wp)
prefix = "wp://"; prefix = "wp://";
if (path_abs(p)) { 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; ret = 1;
else else
snprintf(dest, MAX_IMAGE_PATH_LEN, "%s%s", prefix, p); snprintf(dest, MAX_IMAGE_PATH_LEN, "%s%s", prefix, p);
} else { } 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; ret = 1;
else else
snprintf(dest, MAX_IMAGE_PATH_LEN, "%s%s%s%s", prefix, usr_path, path_get_slash(usr_path), p); snprintf(dest, MAX_IMAGE_PATH_LEN, "%s%s%s%s", prefix, usr_path, path_get_slash(usr_path), p);