-
-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Description
Lines 221 to 223 in 6194b32
while(i<len) { | |
chr = *(tmp++); |
I got a crash/exception on line 223 when calling std::ostream::write(char *, size_t)
with buffers of unknown size (coming from libcurl during an HTTP request). By instead iterating the buffer myself and calling libc's putchar
or libstdc++'s std::ostream::operator<<(char)
, there was no crash/exception.
I believe this might be due to the loop check on line 221 not checking for a possible early null-termination. A possible fix would be:
while (*tmp && i < len)
Metadata
Metadata
Assignees
Labels
No labels