wddx serialize segmentation faults fixs.
| From: | Gerrit Thomson | Date: | Fri, 04 Jun 1999 01:51:09 +0000 |
| Subject: | wddx serialize segmentation faults fixs. | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-6531@lists.php.net to get a copy of this message | ||
Hi Folks,
I managed to fix the segmantation fuatls in the wddx module when
serialising data. I am not sure of the desrialise operation at this
point. There is still possibly a problem with capacity but I am still
investigating it.
My approach was to spot where there seemd to memory allocation problems.
In doing so I removed many uses of erealloc as a potential problem,
these may not be a problem, but the removal makes the code more
understandable.
The other changes involved not relying on the len variable to hold the
current len of the buffer to be allocated. Instead the new allocation
size is determoined where possible form the current string length + the
length of the additional string + 1 for the string terminator. I found
many cases where the allowance for the terminator was left out or
accounted for by being "generous".
the attached dif file should be usefull.
Cheers,
Gerrit Thomson.