X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=image.c;h=ed498ed6562ce832080410a4fc25a9378aeb4727;hb=93ea3eb0edb917080adabff49424e43394a379d5;hp=9f07ce60f174a955f89474114062eb19bb8358eb;hpb=5297b46dcb238b0e738e2bad7ea5b34413d361a8;p=xonotic%2Fdarkplaces.git diff --git a/image.c b/image.c index 9f07ce60..ed498ed6 100644 --- a/image.c +++ b/image.c @@ -1084,6 +1084,9 @@ unsigned char *loadimagepixelsbgra (const char *filename, qbool complain, qbool for (format = firstformat;format->formatstring;format++) { dpsnprintf (name, sizeof(name), format->formatstring, basename); + + FS_SanitizePath(name); + if(FS_FileExists(name) && (f = FS_LoadFile(name, tempmempool, true, &filesize)) != NULL) { mymiplevel = miplevel ? *miplevel : 0;