mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-24 07:19:37 +03:00
[project @ 2003-09-14 23:00:53 by bursa]
Check for errors from Anim_DecompressAligned. svn path=/import/netsurf/; revision=292
This commit is contained in:
parent
eeb805497d
commit
ae62c55cec
19
riscos/gif.c
19
riscos/gif.c
@ -69,7 +69,6 @@ int nsgif_convert(struct content *c, unsigned int iwidth, unsigned int iheight)
|
||||
|
||||
LOG(("Failed to create sprite"));
|
||||
Anim_Destroy(&a);
|
||||
xfree(area);
|
||||
return 1;
|
||||
}
|
||||
c->data.gif.sprite_area = area;
|
||||
@ -79,15 +78,25 @@ int nsgif_convert(struct content *c, unsigned int iwidth, unsigned int iheight)
|
||||
img = (pixel*)header + header->image;
|
||||
mask = (pixel*)header + header->mask;
|
||||
|
||||
Anim_DecompressAligned(f->pImageData, f->nImageSize,
|
||||
a->nWidth, a->nHeight, img);
|
||||
if (!Anim_DecompressAligned(f->pImageData, f->nImageSize,
|
||||
a->nWidth, a->nHeight, img)) {
|
||||
LOG(("Anim_DecompressAligned image failed"));
|
||||
Anim_Destroy(&a);
|
||||
xfree(area);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if(f->pMaskData) {
|
||||
|
||||
int i,n = header->mask - header->image;
|
||||
|
||||
Anim_DecompressAligned(f->pMaskData, f->nMaskSize,
|
||||
a->nWidth, a->nHeight, mask);
|
||||
if (!Anim_DecompressAligned(f->pMaskData, f->nMaskSize,
|
||||
a->nWidth, a->nHeight, mask)) {
|
||||
LOG(("Anim_DecompressAligned mask failed"));
|
||||
Anim_Destroy(&a);
|
||||
xfree(area);
|
||||
return 1;
|
||||
}
|
||||
|
||||
for(i=0; i<n; i++)
|
||||
if(!mask[i]) {
|
||||
|
Loading…
Reference in New Issue
Block a user