Skip to content

Commit d919aea

Browse files
mbrockkeenerd
authored andcommitted
Fix null termination in read_stream
This came up in issue #53.
1 parent 783d3bf commit d919aea

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

jshon.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,8 @@ char* read_stream(FILE* fp)
368368
(ssize_t)st.st_size, (ssize_t)bytes_r);
369369
}
370370

371+
buffer[bytes_r] = 0;
372+
371373
return buffer;
372374
}
373375

0 commit comments

Comments
 (0)