fix read out-of-bands in reading tga header file
parent
98bdb211d3
commit
8b111b2b4a
|
@ -191,7 +191,11 @@ int read_header_tga(gdIOCtx *ctx, oTga *tga)
|
|||
return -1;
|
||||
}
|
||||
|
||||
gdGetBuf(tga->ident, tga->identsize, ctx);
|
||||
|
||||
if (gdGetBuf(tga->ident, tga->identsize, ctx) != tga->identsize) {
|
||||
gd_error("fail to read header ident");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
|
Loading…
Reference in New Issue