diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2021-08-27 21:00:05 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2021-08-27 21:00:05 +0300 |
commit | fb34abc341b1508c5f8b91bb7114a5e8ebd957bb (patch) | |
tree | b25559b1e3b681de12fb74a4e1f78011aedf7d31 /libmailutils | |
parent | 6615773212171521bc46dac661f4d5414fe379f9 (diff) | |
download | mailutils-fb34abc341b1508c5f8b91bb7114a5e8ebd957bb.tar.gz mailutils-fb34abc341b1508c5f8b91bb7114a5e8ebd957bb.tar.bz2 |
Bugfix
* libmailutils/stream/stream.c (mu_stream_timed_getdelim): If buffer
points to NULL, assume size = 0.
Diffstat (limited to 'libmailutils')
-rw-r--r-- | libmailutils/stream/stream.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libmailutils/stream/stream.c b/libmailutils/stream/stream.c index 9e0ae846e..e3e011c9e 100644 --- a/libmailutils/stream/stream.c +++ b/libmailutils/stream/stream.c @@ -1019,6 +1019,9 @@ mu_stream_timed_getdelim (mu_stream_t stream, char **pbuf, size_t *psize, if ((rc = _stream_flush_buffer (stream, FLUSH_WRITE))) return rc; + + if (lineptr == NULL) + n = 0; for (;;) { |