nanogui: Possible free bug in winres.c


Previous by date: 9 Aug 2007 00:02:41 +0100 Re: Problem in building Microwindows, Uwe Klatt
Next by date: 9 Aug 2007 00:02:41 +0100 Re: Problem in building Microwindows, Kernel Mojo
Previous in thread:
Next in thread:

Subject: Possible free bug in winres.c
From: "Wayne J" ####@####.####
Date: 9 Aug 2007 00:02:41 +0100
Message-Id: <F074A17E662243E2B84A3DF60B0D0969@mobility>

I am using code that I pulled out of CVS several weeks to a month ago.

The function mwFreeInstance() (winres.c) tries to free a buffer that was not 
allocated by mwCreateInstance()

shouldn't

 free((void *) ((PMWAPPINSTANCE) hInst)->szExecCommand);

really be:

 free((void *) ((PMWAPPINSTANCE) hInst)->szCmdLine);

mwCreateInstance allocates a buffer and stores the pointer in szCmdLine. 
szExecCommand is a pointer to argv[0] that was passed into the function.







Previous by date: 9 Aug 2007 00:02:41 +0100 Re: Problem in building Microwindows, Uwe Klatt
Next by date: 9 Aug 2007 00:02:41 +0100 Re: Problem in building Microwindows, Kernel Mojo
Previous in thread:
Next in thread:


Powered by ezmlm-browse 0.20.