Replace the static error string in ZIP_Put_In_Cache0 with on stack memory (original) (raw)
Sean Chou zhouyx at linux.vnet.ibm.com
Thu Apr 19 08:05:16 UTC 2012
- Previous message: Replace the static error string in ZIP_Put_In_Cache0 with on stack memory
- Next message: Replace the static error string in ZIP_Put_In_Cache0 with on stack memory
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Thanks David and Alan, shall I find some one to commit it ?
On Thu, Apr 19, 2012 at 8:53 AM, David Holmes <david.holmes at oracle.com>wrote:
On 19/04/2012 4:05 AM, Alan Bateman wrote:
On 18/04/2012 14:02, David Holmes wrote:
On 18/04/2012 10:23 PM, Sean Chou wrote:
Hi David, Alan,
So is the patch acceptable ?
There is still the matter of the unexpected NULL if strdup fails. I'd need to see the clients for this code to see how they handle failure. My concern is the case where the caller sees a NULL return which indicates an error, and so accesses the msg and now potentially hits another NULL. It's unlikely but ... I looked through the usages and nothing obvious jumps out. HotSpot will invoke ZIPOpen and that now returns a fixed string in the event of a failure. The library code opens the zip file directly and then uses ZIPPutInCache0 which seems to be handling this case. Yes looks like we only have two bits of client code here and ZipFile.c checks for NULL. Ok. David ----- -Alan.
-- Best Regards, Sean Chou
- Previous message: Replace the static error string in ZIP_Put_In_Cache0 with on stack memory
- Next message: Replace the static error string in ZIP_Put_In_Cache0 with on stack memory
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]