Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion builtins/libAfterImage/import.c
Original file line number Diff line number Diff line change
Expand Up @@ -1212,7 +1212,7 @@ png2ASImage_int( void *data, png_rw_ptr read_fn, ASImageImportParams *params )
int bit_depth, color_type, interlace_type;
int intent;
ASScanline buf;
CARD8 *upscaled_gray = NULL;
CARD8 * volatile upscaled_gray = NULL;
Bool do_alpha = False, grayscale = False ;
png_bytep *row_pointers, row;
unsigned int y;
Expand Down
14 changes: 9 additions & 5 deletions builtins/libAfterImage/xcf.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,14 @@ read_xcf_image( FILE *fp )
xcf_im->version = 0 ;
else
xcf_im->version = atoi(&(sig[XCF_SIGNATURE_LEN+1]));
if( xcf_read32( fp, &(xcf_im->width), 3 ) < 3 )
{
CARD32 arr[3];
if( xcf_read32( fp, arr, 3 ) < 3 ) {
free( xcf_im );
xcf_im = NULL ;
} else {
xcf_im->width = arr[0];
xcf_im->height = arr[1];
xcf_im->type = arr[2];
}
}
}
Expand Down Expand Up @@ -609,11 +613,11 @@ read_xcf_hierarchy( XcfImage *xcf_im, FILE *fp, CARD8 opacity, ARGB32 colormask

if (XCF_TILE_WIDTH < h->width)
tile_buf = safemalloc (h->width*XCF_TILE_HEIGHT*6);

if (xcf_im->width < h->width)
for( i = 0 ; i < XCF_TILE_HEIGHT ; i++ )
{
free_scanline (&(xcf_im->scanline_buf[i]), True);
free_scanline (&(xcf_im->scanline_buf[i]), True);
prepare_scanline (h->width,0,&(xcf_im->scanline_buf[i]), False );
}

Expand Down Expand Up @@ -730,7 +734,7 @@ store_colors( CARD8 *data, ASScanline *curr_buf, int bpp, int comp, int offset_x
}else
out = &(curr_buf->alpha[offset_x]);

if( out )
if( out )
for( i = 0 ; i < width ; i++ )
out[i] = data[i] ;
}
Expand Down
Loading