Commit ee16b381 authored by gbazin's avatar gbazin
Browse files

* src/input/stream.c: fixed invalid memory access in stream_ReadLine().

parent 1369d55b
......@@ -1551,7 +1551,7 @@ char * stream_ReadLine( stream_t *s )
}
/* Remove trailing LF/CR */
while( i_line > 0 && ( p_line[i_line-2] == '\r' ||
while( i_line >= 2 && ( p_line[i_line-2] == '\r' ||
p_line[i_line-2] == '\n') ) i_line--;
/* Make sure the \0 is there */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment