X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=image.c;fp=image.c;h=ed498ed6562ce832080410a4fc25a9378aeb4727;hb=8b6a72238c9e0686395f9849a9c00f8762f3a244;hp=9f07ce60f174a955f89474114062eb19bb8358eb;hpb=8ae31a0c113fae6279d3e18c0482fdd4b0ef7647;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;