1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-21 21:38:00 +01:00

fix for 0 sized images

This commit is contained in:
kojima
2002-10-25 03:43:57 +00:00
parent 55efa1f268
commit 0f0afc48ab
4 changed files with 16 additions and 2 deletions

View File

@@ -154,7 +154,7 @@ RLoadPPM(RContext *context, char *file_name, int index)
}
/* get size */
if (sscanf(buffer, "%i %i", &w, &h)!=2)
if (sscanf(buffer, "%i %i", &w, &h)!=2 || w < 1 || h < 1)
goto bad_file;