Commit 12a75bc8 authored by Petri Hintukainen's avatar Petri Hintukainen

Fix possible OOB read with empty path

parent af69041d
Pipeline #5942 passed with stage
in 2 minutes and 1 second
......@@ -539,7 +539,7 @@ int disc_cache_bdrom_file(BD_DISC *p, const char *rel_path, const char *cache_pa
/* plain directory ? */
size = strlen(rel_path);
if (rel_path[size - 1] == '/' || rel_path[size - 1] == '\\') {
if (size < 1 || rel_path[size - 1] == '/' || rel_path[size - 1] == '\\') {
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment