diff options
author | jcid <devnull@localhost> | 2008-03-15 18:45:21 +0100 |
---|---|---|
committer | jcid <devnull@localhost> | 2008-03-15 18:45:21 +0100 |
commit | d5858b9acb103e69d53a9e73d89304a7c3f5d09a (patch) | |
tree | 4f7a98941e1cfee7851a632dc214b352eb8c780a | |
parent | 70e6985228cbe461ef84e047860e7cc30c15b5bb (diff) |
- Added a warning message for false GIF files.
-rw-r--r-- | src/gif.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -762,12 +762,9 @@ static int Gif_check_sig(DilloGif *gif, const uchar_t *ibuf, int ibsize) /* at beginning of file - read magic number */ if (ibsize < 6) return 0; - if (memcmp(ibuf, "GIF", 3) != 0) { - gif->state = 999; - return 6; - } - if (memcmp(ibuf + 3, "87a", 3) != 0 && - memcmp(ibuf + 3, "89a", 3) != 0) { + if (memcmp(ibuf, "GIF87a", 6) != 0 && + memcmp(ibuf, "GIF89a", 6) != 0) { + MSG_WARN("\"%s\" is not a GIF file.\n", URL_STR(gif->url)); gif->state = 999; return 6; } |