aboutsummaryrefslogtreecommitdiff
path: root/src/gif.c
diff options
context:
space:
mode:
authorjcid <devnull@localhost>2008-03-15 18:45:21 +0100
committerjcid <devnull@localhost>2008-03-15 18:45:21 +0100
commitd5858b9acb103e69d53a9e73d89304a7c3f5d09a (patch)
tree4f7a98941e1cfee7851a632dc214b352eb8c780a /src/gif.c
parent70e6985228cbe461ef84e047860e7cc30c15b5bb (diff)
- Added a warning message for false GIF files.
Diffstat (limited to 'src/gif.c')
-rw-r--r--src/gif.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/gif.c b/src/gif.c
index 871a13d9..67560a5c 100644
--- a/src/gif.c
+++ b/src/gif.c
@@ -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;
}