nanogui: Image size limit?


Previous by date: 13 Jul 2006 20:20:59 +0100 Re: Image size limit?, Greg Haerr
Next by date: 13 Jul 2006 20:20:59 +0100 Re: Image size limit?, Greg Haerr
Previous in thread: 13 Jul 2006 20:20:59 +0100 Re: Image size limit?, Greg Haerr
Next in thread: 13 Jul 2006 20:20:59 +0100 Re: Image size limit?, Greg Haerr

Subject: RE: [nanogui] RE: Image size limit?
From: "Martin Kajdas" ####@####.####
Date: 13 Jul 2006 20:20:59 +0100
Message-Id: <CF2BB830A62F914F848E5AD5FFF57AC229152F@mkmail.MKPROD.COM>

GrNewBitmapFromData mallocated 49000 bytes, and it written also 49000 (from p - buf).
GrBitmap bitmapsize=49000, width and height also correct.
All the numbers make sense but memcpy (in GrBitmap) for some reason crashes.

I also added 50000 to GrNewBitmapFromData malloc() but still failed.

I ma really confused now.
Martin


-----Original Message-----
From: Greg Haerr ####@####.####
Sent: Thursday, July 13, 2006 11:05 AM
To: Martin Kajdas; ####@####.####
Subject: Re: [nanogui] RE: Image size limit?


Well, the GrBitmap function is very likely crashing
by memcpy'ing data outside the valid alloc'd range.
This is likely caused by incorrect calculations earlier
regarding either incoming bitmap size from NXLIB
or possibly bad bitmap linelength calculation, or
the for loop in the xxxFromData calls.  The for
loop sizing was the culprit in the earlier CVS
fix for crashing in these routines.

Another idea would be to force malloc() much
larger sizes in these routines along with printf()'ing
the sizes to compare with the incoming bitmap.

Regards,

Greg

Previous by date: 13 Jul 2006 20:20:59 +0100 Re: Image size limit?, Greg Haerr
Next by date: 13 Jul 2006 20:20:59 +0100 Re: Image size limit?, Greg Haerr
Previous in thread: 13 Jul 2006 20:20:59 +0100 Re: Image size limit?, Greg Haerr
Next in thread: 13 Jul 2006 20:20:59 +0100 Re: Image size limit?, Greg Haerr


Powered by ezmlm-browse 0.20.