Commit 90b959a6 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

history: avoid crashing when the positionlog file is malformed

No related merge requests found
Showing with 4 additions and 0 deletions
+4 -0
......@@ -3192,7 +3192,11 @@ void load_poshistory(void)
/* Find where the x index and line number are in the line. */
xptr = revstrstr(line, " ", line + read - 3);
if (xptr == NULL)
continue;
lineptr = revstrstr(line, " ", xptr - 2);
if (lineptr == NULL)
continue;
/* Now separate the three elements of the line. */
*(xptr++) = '\0';
......
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