1. libgd
  2. Untitled project
  3. gd-libgd

Commits

nlopess  committed 9fa6da1

MFB

  • Participants
  • Parent commits 4f83e6f
  • Branches GD-2.0

Comments (0)

Files changed (1)

File src/gd_gif_in.c

View file
  • Ignore whitespace
        int             bitPixel;
        int	       i;
        /*1.4//int             imageCount = 0; */
-       char            version[4];
        /* 2.0.28: threadsafe storage */
        int ZeroDataBlock = FALSE;
 
        if (strncmp((char *)buf,"GIF",3) != 0) {
 		return 0;
 	}
-       strncpy(version, (char *)buf + 3, 3);
-       version[3] = '\0';
 
-       if ((strcmp(version, "87a") != 0) && (strcmp(version, "89a") != 0)) {
+       if ((strncmp((char *)buf+3, "87a", 3) != 0) && (strncmp((char *)buf+3, "89a", 3) != 0)) {
 		return 0;
 	}
        if (! ReadOK(fd,buf,7)) {