diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_SVG_Image.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Fl_SVG_Image.cxx b/src/Fl_SVG_Image.cxx index 83e41a24a..7ff6c72fa 100644 --- a/src/Fl_SVG_Image.cxx +++ b/src/Fl_SVG_Image.cxx @@ -82,7 +82,9 @@ static char *svg_inflate(const char *fname) { FILE *in = fl_fopen(fname, "r"); if (!in) return NULL; unsigned char header[2]; - fread(header, 2, 1, in); + if (fread(header, 2, 1, in) < 1) { // FIXME: can't read file header + header[0] = header[1] = 0; // FIXME: continuing anyway ? + } int direct = (header[0] != 0x1f || header[1] != 0x8b); fseek(in, 0, SEEK_END); long size = ftell(in); |
