develooper Front page | perl.perl5.porters | Postings from March 2006

[patch@27538] Misc vms.c fixes for buffer sizes.

Thread Next
John E. Malmberg
March 19, 2006 17:08
[patch@27538] Misc vms.c fixes for buffer sizes.
Message ID:
This patch fixes a few cases where it either it may be possible that a 
buffer was overrun, or that a code change to dynamic allocation could 
cause a sizeof() operator to be incorrect.  In several places a buffer 
was under allocated by 1 byte.

This also restores the default behavior to be for stat() to handle 
/dev/null and nla0:.  As of this patch, the accvio is not showing up, 
and based on HP's investigation, it was caused by corruption of the 
memory used for malloc() before the stat() call.

The suspicion by HP was that there was a 1 byte overrun of an buffer 
being allocated by malloc().

If the access violation shows back up, I intend to troubleshoot by over 
allocating memory allocations by 1 or more bytes and putting a signature 
in those bytes, which will be checked when memory is freed.

Personal Opinion Only

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About