On an AIX 4.3 system the command "image create
photo" fails in file tkImgPhoto.c, function,
ImgPhotoSetSize, line 2656, when attemptckalloc() is
called. AIX and some other systems (Tru64) return
NULL from an alloc call for 0 size. This problem affects
only Tk 8.4. The fix that I have successfully tested is
if ((width != masterPtr->width) || (height != masterPtr-
>height) || (masterPtr->pix24 == NULL) {
unsigned size;
size = height * pitch;
if (size > 0) {
newPix24 = (unsigned char *) attemptckalloc(size);
if (newPix24 == NULL) { return TCL_ERROR; }
}
else { newPix24 = NULL; }
}
Logged In: YES
user_id=79902
This bug was fixed for the 8.4.1 release