
4 Nov
2024
4 Nov
'24
3:03 a.m.
On Mon, Nov 04, 2024 at 08:42:37 +0100, Ján Tomko wrote:
Add an error message for the rare case if json_tokener_new fails (allocation failure) and guard any use of json_tokener_free where tok might be NULL (this was possible in libvirt-nss when the json file could not be opened).
https://gitlab.com/libvirt/libvirt/-/issues/581
Signed-off-by: Ján Tomko <jtomko@redhat.com> Reported-by: Simon Pilkington --- src/util/virjson.c | 8 +++++++- tools/nss/libvirt_nss_leases.c | 7 ++++++- tools/nss/libvirt_nss_macs.c | 7 ++++++- 3 files changed, 19 insertions(+), 3 deletions(-)
Reviewed-by: Peter Krempa <pkrempa@redhat.com>