Commit 25f14bdd 25f14bddd6a2df8d0b85a40d6a179170f0f57311 by Sergey Poznyakoff

Fix possible coredump in stream library.

* libmailutils/stream/stream.c (mu_stream_strerror): stream can be NULL.
1 parent 68f81619
...@@ -371,6 +371,8 @@ mu_stream_strerror (mu_stream_t stream, int rc) ...@@ -371,6 +371,8 @@ mu_stream_strerror (mu_stream_t stream, int rc)
371 { 371 {
372 const char *str; 372 const char *str;
373 373
374 if (!stream)
375 return mu_strerror (rc);
374 if (stream->error_string) 376 if (stream->error_string)
375 str = stream->error_string (stream, rc); 377 str = stream->error_string (stream, rc);
376 else 378 else
......