mirror of
https://github.com/moparisthebest/curl
synced 2025-03-11 07:39:50 -04:00
don't advance the line pointer if it already points to the null terminator
This commit is contained in:
parent
e096072745
commit
7d15651115
@ -2039,7 +2039,7 @@ static int parseconfig(const char *filename,
|
|||||||
alloced_param=FALSE;
|
alloced_param=FALSE;
|
||||||
|
|
||||||
/* lines with # in the fist column is a comment! */
|
/* lines with # in the fist column is a comment! */
|
||||||
while(isspace((int)*line))
|
while(*line && isspace((int)*line))
|
||||||
line++;
|
line++;
|
||||||
|
|
||||||
switch(*line) {
|
switch(*line) {
|
||||||
@ -2059,7 +2059,8 @@ static int parseconfig(const char *filename,
|
|||||||
line++;
|
line++;
|
||||||
/* ... and has ended here */
|
/* ... and has ended here */
|
||||||
|
|
||||||
*line++=0; /* zero terminate, we have a local copy of the data */
|
if(*line)
|
||||||
|
*line++=0; /* zero terminate, we have a local copy of the data */
|
||||||
|
|
||||||
#ifdef DEBUG_CONFIG
|
#ifdef DEBUG_CONFIG
|
||||||
fprintf(stderr, "GOT: %s\n", option);
|
fprintf(stderr, "GOT: %s\n", option);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user