Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.1:Rings:1-MinimalX
systemd
0004-shared-conf-parser.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0004-shared-conf-parser.patch of Package systemd
Based on 83e341a637b75f7f592a5dc717c34d8b67ed4ffa Mon Sep 17 00:00:00 2001 From: Tom Gundersen <teg@jklm.no> Date: Wed, 17 Sep 2014 22:17:53 +0200 Subject: [PATCH] shared: conf-parser Check memory allocation. Found by Coverity. Fixes CID #1237644. --- src/shared/conf-parser.h | 4 ++++ 1 file changed, 4 insertions(+) --- src/shared/conf-parser.h +++ src/shared/conf-parser.h 2014-09-18 13:07:07.314735514 +0000 @@ -181,6 +181,8 @@ int log_syntax_internal(const char *unit assert(data); \ \ xs = new0(type, 1); \ + if(!xs) \ + return -ENOMEM; \ *xs = invalid; \ \ FOREACH_WORD(w, l, rvalue, state) { \ @@ -213,6 +215,7 @@ int log_syntax_internal(const char *unit xs = realloc(xs, (++i + 1) * sizeof(type)); \ if (!xs) \ return -ENOMEM; \ + \ *(xs + i) = invalid; \ } \ \
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