(_scan_body): Bugfix. Add null terminator to the string read.
Showing
1 changed file
with
1 additions
and
0 deletions
... | @@ -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 | } | ... | ... |
-
Please register or sign in to post a comment