~mdw
/
secnet
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
log: Eliminate potential out-of-control recursion
[secnet]
/
util.c
diff --git
a/util.c
b/util.c
index
fff5b6d
..
086c234
100644
(file)
--- a/
util.c
+++ b/
util.c
@@
-166,6
+166,7
@@
static const char *phases[NR_PHASES]={
"PHASE_GETOPTS",
"PHASE_READCONFIG",
"PHASE_SETUP",
"PHASE_GETOPTS",
"PHASE_READCONFIG",
"PHASE_SETUP",
+ "PHASE_DAEMONIZE",
"PHASE_GETRESOURCES",
"PHASE_DROPPRIV",
"PHASE_RUN",
"PHASE_GETRESOURCES",
"PHASE_DROPPRIV",
"PHASE_RUN",
@@
-268,6
+269,7
@@
void *buf_unappend(struct buffer_if *buf, int32_t amount) {
void *buf_unprepend(struct buffer_if *buf, int32_t amount) {
void *p;
void *buf_unprepend(struct buffer_if *buf, int32_t amount) {
void *p;
+ if (buf->size < amount) return 0;
p=buf->start;
buf->start+=amount;
buf->size-=amount;
p=buf->start;
buf->start+=amount;
buf->size-=amount;