rem: if (read(fd,buf,3*depth) == -1) {
add: if (read(fd, buf, (size_t)(3*depth)) == -1) {
context: NsTclGifSizeObjCmd(ClientData arg, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]){    int fd;    unsigned char  buf[0x300];    int depth, colormap, dx, dy, status;    if (objc != 2) {        Tcl_WrongNumArgs(interp, 1, objv, "gif");        return TCL_ERROR;    }    fd = open(Tcl_GetString(objv[1]), O_RDONLY|O_BINARY);    if (fd == -1) {        Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), "could not open \"",             Tcl_GetString(objv[1]),	        "\": ", Tcl_PosixError(interp), NULL);        return TCL_ERROR;    }    status = TCL_ERROR;    /*     * Read the GIF version number     */        if (read(fd, buf, 6) == -1) {readfail:        Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), "could not read \"",             Tcl_GetString(objv[1]),            "\": ", Tcl_PosixError(interp), NULL);	goto done;    }    if (strncmp((char *) buf, "GIF87a", 6) && 	strncmp((char *) buf, "GIF89a", 6)) {badfile:        Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), "invalid gif file: ",                 Tcl_GetString(objv[1]), NULL);        goto done;    }    if (read(fd, buf, 7) == -1) {	goto readfail;    }    depth = 1 << ((buf[4] & 0x7) + 1);    colormap = (buf[4] & 0x80 ? 1 : 0);    if (colormap) {        if (read(fd,buf,3*depth) == -1) {            goto readfail;        }    }  outerloop:    if (read(fd, buf, 1) == -1) {        goto readfail;    }    if (buf[0] == '!') {        unsigned char count;	        if (read(fd, buf, 1) == -1) {            goto readfail;        }      innerloop:        if (read(fd, (char *) &count, 1) == -1) {            goto readfail;        }        if (count == 0) {            goto outerloop;        }        if (read(fd, buf, count) == -1) {            goto readfail;        }        goto innerloop;    } else if (buf[0] != ',') {        goto badfile;    }    if (read(fd,buf,9) == -1) {        goto readfail;    }    dx = 0x100 * buf[5] + buf[4];    dy = 0x100 * buf[7] + buf[6];    if(AppendObjDims(interp, dx, dy) != TCL_OK) {		return TCL_ERROR;	};    status = TCL_OK;done:    close(fd);    return status;}