Re: [xml] [PATCH] fix memory leak when xmlRegStatePush failed



On 12/01/2021 10:42, zhuyan (M) wrote:

In the function xmlRegStatePush, if xmlMalloc or xmlRealloc fails,

Yes, there are many issues that arise from poor handling of malloc failures. Fortunately, similar issues can be found quite effectively by changing the fuzzers to inject malloc failures. I already started to address these errors in a more systematic way, but I want to hold off further commits until after the next release.

Note that in this particular case, it is easier to make static function xmlRegStatePush free the 'to' state on error.

Nick


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]