Re: [xml] [PATCH] fix memory leak when xmlRegStatePush failed
- From: Nick Wellnhofer <wellnhofer aevum de>
- To: "zhuyan (M)" <zhuyan34 huawei com>, "xml gnome org" <xml gnome org>
- Cc: "chenzefeng (A)" <chenzefeng2 huawei com>, "liucheng (G)" <liucheng32 huawei com>, Zengweilin <zengweilin huawei com>
- Subject: Re: [xml] [PATCH] fix memory leak when xmlRegStatePush failed
- Date: Sat, 13 Mar 2021 19:06:58 +0100
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]