Merge pull request #4804 from tsoliman/media-history-fix

Media history: fix buffer overflow
This commit is contained in:
Miran Grča
2024-09-07 00:24:28 +02:00
committed by GitHub

View File

@@ -337,7 +337,7 @@ MediaHistoryManager::removeMissingImages(device_index_list_t &device_history)
}
char *p = checked_path.toUtf8().data();
char temp[1024] = { 0 };
char temp[MAX_IMAGE_PATH_LEN -1] = { 0 };
if (path_abs(p)) {
if (strlen(p) > (MAX_IMAGE_PATH_LEN - 1))