Commit 1136f9e3 1136f9e380f2f66a21fd6388cffc6ef41281cd4e by Sergey Poznyakoff

(_scan_body): Bugfix. Add null terminator to the string read.

1 parent af294b27
...@@ -723,6 +723,7 @@ _scan_body (struct parsebuf *pb, char *text) ...@@ -723,6 +723,7 @@ _scan_body (struct parsebuf *pb, char *text)
723 && stream_read (stream, buffer, sizeof(buffer)-1, offset, &n) == 0 723 && stream_read (stream, buffer, sizeof(buffer)-1, offset, &n) == 0
724 && n > 0) 724 && n > 0)
725 { 725 {
726 buffer[n] = 0;
726 offset += n; 727 offset += n;
727 rc = util_strcasestr (buffer, text) != NULL; 728 rc = util_strcasestr (buffer, text) != NULL;
728 } 729 }
......