← Commit list

2894266f1

Eric Andersen
Eric Andersen
2003-04-19
FAILED Duration: 95s

Subject

Patch from David Updegraff to avoid corrupting memory while parsing the networks/iterfaces file with next_word routine. Without this, next_word increments one beyond the end of the string.

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

networking/ifupdown.c+5 -2
@@ -630,8 +630,11 @@ static char *next_word(char **buf)
return(NULL);
}
*buf = word + length;
- **buf = '\0';
- (*buf)++;
+ /*DBU:[[email protected]] if we are already at EOL dont't increment beyond it */
+ if (**buf) {
+ **buf = '\0';
+ (*buf)++;
+ }
return word;
}