Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:GA
libplist.4095
0030-bplist-Make-sure-to-bail-out-if-malloc-fai...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0030-bplist-Make-sure-to-bail-out-if-malloc-fails-in-pars.patch of Package libplist.4095
From 56ba9bf7f625f6b72df982e7ef298b9791b1cf47 Mon Sep 17 00:00:00 2001 From: Nikias Bassen <nikias@gmx.li> Date: Tue, 7 Feb 2017 12:44:52 +0100 Subject: [PATCH 37/41] bplist: Make sure to bail out if malloc() fails in parse_data_node() Credit to OSS-Fuzz --- src/bplist.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/bplist.c b/src/bplist.c index 20e5090..c1f6007 100644 --- a/src/bplist.c +++ b/src/bplist.c @@ -394,6 +394,10 @@ static plist_t parse_data_node(const char **bnode, uint64_t size) data->type = PLIST_DATA; data->length = size; data->buff = (uint8_t *) malloc(sizeof(uint8_t) * size); + if (!data->strval) { + plist_free_data(data); + return NULL; + } memcpy(data->buff, *bnode, sizeof(uint8_t) * size); return node_create(NULL, data); -- 2.6.6
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor