Commit c7246a16 c7246a16910aa37caa79a83a678e6c5da8193a5d by Sergey Poznyakoff

(stream_sequential_readline, stream_strerror): Check for stream == NULL.

1 parent 6639ff69
...@@ -686,6 +686,8 @@ stream_sequential_readline (stream_t stream, char *buf, size_t size, ...@@ -686,6 +686,8 @@ stream_sequential_readline (stream_t stream, char *buf, size_t size,
686 int 686 int
687 stream_sequential_write (stream_t stream, char *buf, size_t size) 687 stream_sequential_write (stream_t stream, char *buf, size_t size)
688 { 688 {
689 if (stream == NULL)
690 return EINVAL;
689 while (size > 0) 691 while (size > 0)
690 { 692 {
691 size_t sz; 693 size_t sz;
...@@ -703,6 +705,8 @@ stream_sequential_write (stream_t stream, char *buf, size_t size) ...@@ -703,6 +705,8 @@ stream_sequential_write (stream_t stream, char *buf, size_t size)
703 int 705 int
704 stream_strerror (stream_t stream, const char **p) 706 stream_strerror (stream_t stream, const char **p)
705 { 707 {
708 if (stream == NULL)
709 return EINVAL;
706 if (stream->_strerror) 710 if (stream->_strerror)
707 return stream->_strerror (stream, p); 711 return stream->_strerror (stream, p);
708 return ENOSYS; 712 return ENOSYS;
......