rem: if (bla1/height != width || bla2/4 != bla1 || bla2 > INT_MAX-32) {
add: if (bla2/4 != bla1) { RErrorCode = RERR_NOMEMORY; return NULL; }  if (bla2 > INT_MAX - 4) {
context: RCreateImage(unsigned width, unsigned height, int alpha){    RImage *image=NULL;    unsigned bla1, bla2;        assert(width>0 && height>0);        /* detect overflow (gr33tz to ruda :D) */    bla1 = width*height;    bla2 = bla1*4;    if (bla1/height != width || bla2/4 != bla1 || bla2 > INT_MAX-32) {	RErrorCode = RERR_NOMEMORY;	return NULL;    }    image = malloc(sizeof(RImage));    if (!image) {	RErrorCode = RERR_NOMEMORY;        return NULL;    }    memset(image, 0, sizeof(RImage));    image->width = width;    image->height = height;    image->format = alpha ? RRGBAFormat : RRGBFormat;    image->refCount = 1;    /* the +4 is to give extra bytes at the end of the buffer,     * so that we can optimize image conversion for MMX(tm).. see convert.c     */    image->data = malloc(width * height * (alpha ? 4 : 3) + 4);    if (!image->data) {	RErrorCode = RERR_NOMEMORY;	free(image);	image = NULL;    }    return image;}