- byte *palette, *a, *b, *image_rgba, *fin, *pbuf;
- int x, y, dataByte, runLength;
+ byte *palette, *a, *b, *image_rgba, *fin, *pbuf, *enddata;
+ int x, y, x2, dataByte;
+
+ if (loadsize < sizeof(pcx) + 768)
+ {
+ Con_Printf ("Bad pcx file\n");
+ qfree(f);
+ return NULL;
+ }