Update to latest git
This commit is contained in:
parent
0e1d85613a
commit
708deb95da
536 changed files with 65844 additions and 113 deletions
34
0286-shared-conf-parser.patch
Normal file
34
0286-shared-conf-parser.patch
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
From 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(+)
|
||||
|
||||
diff --git a/src/shared/conf-parser.h b/src/shared/conf-parser.h
|
||||
index a17dde9069..94185152cd 100644
|
||||
--- a/src/shared/conf-parser.h
|
||||
+++ b/src/shared/conf-parser.h
|
||||
@@ -179,6 +179,9 @@ int log_syntax_internal(const char *unit, int level,
|
||||
assert(data); \
|
||||
\
|
||||
xs = new0(type, 1); \
|
||||
+ if(!xs) \
|
||||
+ return -ENOMEM; \
|
||||
+ \
|
||||
*xs = invalid; \
|
||||
\
|
||||
FOREACH_WORD(word, l, rvalue, state) { \
|
||||
@@ -211,6 +214,7 @@ int log_syntax_internal(const char *unit, int level,
|
||||
xs = realloc(xs, (++i + 1) * sizeof(type)); \
|
||||
if (!xs) \
|
||||
return -ENOMEM; \
|
||||
+ \
|
||||
*(xs + i) = invalid; \
|
||||
} \
|
||||
\
|
||||
Loading…
Add table
Add a link
Reference in a new issue