Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:nferenc:netbook
libmb1
libmb-pixmap_fixes-1.9.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File libmb-pixmap_fixes-1.9.diff of Package libmb1
Index: libmb/mbpixbuf.c =================================================================== --- libmb/mbpixbuf.c (revision 2104) +++ libmb/mbpixbuf.c (working copy) @@ -22,6 +22,7 @@ #include <strings.h> #include "mbpixbuf.h" +#include "mbutil.h" #define BYTE_ORD_24_RGB 0 #define BYTE_ORD_24_RBG 1 @@ -1298,6 +1299,8 @@ void mb_pixbuf_img_free(MBPixbuf *pb, MBPixbufImage *img) { + // Sometimes just we have this and everything crash + if (img == NULL) return; if (img->rgba) free(img->rgba); free(img); } @@ -1422,6 +1425,10 @@ unsigned char *sp, *dp; int dbc = 0; + if ( src == NULL || dest == NULL ){ + return NULL; + } + if (src->has_alpha == False) return mb_pixbuf_img_copy(pb, dest, src, 0, 0, src->width, src->height, dx, dy); @@ -1633,7 +1640,9 @@ int *xsample, *ysample; int bytes_per_line, i, x, y, r, g, b, a, nb_samples, xrange, yrange, rx, ry; - if ( new_width > img->width || new_height > img->height) + // Sometime there comes new_witdh=0 or new_height=0 it kill this.. babe + if ( img == NULL || new_width > img->width || new_height > img->height || + new_width == 0 || new_height == 0) return NULL; if (img->has_alpha) @@ -1741,7 +1750,8 @@ unsigned char *dest, *src; int x, y, xx, yy, bytes_per_line; - if ( new_width < img->width || new_height < img->height) + if ( img == NULL || new_width < img->width || new_height < img->height || + new_width == 0 || new_height == 0 ) return NULL; if (img->has_alpha)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor