+2003-01-25 Ron Steinke <rsteinke@w-link.net>
+
+ (Ancient, binary compatible fixes found sitting in my tree)
+
+ * Added early checks for count == 0 and buf == NULL in g_io_channel_read()
+
+ * Better error message for EFAULT in g_io_channel_error_from_errno()
+
2003-01-04 Tor Lillqvist <tml@iki.fi>
* Makefile.am (BUILT_EXTRA_DIST): Don't distribute glib-zip.
+2003-01-25 Ron Steinke <rsteinke@w-link.net>
+
+ (Ancient, binary compatible fixes found sitting in my tree)
+
+ * Added early checks for count == 0 and buf == NULL in g_io_channel_read()
+
+ * Better error message for EFAULT in g_io_channel_error_from_errno()
+
2003-01-04 Tor Lillqvist <tml@iki.fi>
* Makefile.am (BUILT_EXTRA_DIST): Don't distribute glib-zip.
+2003-01-25 Ron Steinke <rsteinke@w-link.net>
+
+ (Ancient, binary compatible fixes found sitting in my tree)
+
+ * Added early checks for count == 0 and buf == NULL in g_io_channel_read()
+
+ * Better error message for EFAULT in g_io_channel_error_from_errno()
+
2003-01-04 Tor Lillqvist <tml@iki.fi>
* Makefile.am (BUILT_EXTRA_DIST): Don't distribute glib-zip.
+2003-01-25 Ron Steinke <rsteinke@w-link.net>
+
+ (Ancient, binary compatible fixes found sitting in my tree)
+
+ * Added early checks for count == 0 and buf == NULL in g_io_channel_read()
+
+ * Better error message for EFAULT in g_io_channel_error_from_errno()
+
2003-01-04 Tor Lillqvist <tml@iki.fi>
* Makefile.am (BUILT_EXTRA_DIST): Don't distribute glib-zip.
+2003-01-25 Ron Steinke <rsteinke@w-link.net>
+
+ (Ancient, binary compatible fixes found sitting in my tree)
+
+ * Added early checks for count == 0 and buf == NULL in g_io_channel_read()
+
+ * Better error message for EFAULT in g_io_channel_error_from_errno()
+
2003-01-04 Tor Lillqvist <tml@iki.fi>
* Makefile.am (BUILT_EXTRA_DIST): Don't distribute glib-zip.
+2003-01-25 Ron Steinke <rsteinke@w-link.net>
+
+ (Ancient, binary compatible fixes found sitting in my tree)
+
+ * Added early checks for count == 0 and buf == NULL in g_io_channel_read()
+
+ * Better error message for EFAULT in g_io_channel_error_from_errno()
+
2003-01-04 Tor Lillqvist <tml@iki.fi>
* Makefile.am (BUILT_EXTRA_DIST): Don't distribute glib-zip.
g_return_val_if_fail (channel != NULL, G_IO_ERROR_UNKNOWN);
g_return_val_if_fail (bytes_read != NULL, G_IO_ERROR_UNKNOWN);
+ if (count == 0)
+ {
+ if (bytes_read)
+ *bytes_read = 0;
+ return G_IO_STATUS_NORMAL;
+ }
+
+ g_return_val_if_fail (buf != NULL, G_IO_ERROR_UNKNOWN);
+
status = channel->funcs->io_read (channel, buf, count, bytes_read, &err);
error = g_io_error_get_from_g_error (status, err);
#ifdef EFAULT
case EFAULT:
- g_warning("File descriptor outside valid address space.\n");
+ g_warning("Buffer outside valid address space.\n");
return G_IO_CHANNEL_ERROR_FAILED;
#endif