mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-22 08:58:54 +02:00
(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()
This commit is contained in:
@@ -1,3 +1,11 @@
|
|||||||
|
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>
|
2003-01-04 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* Makefile.am (BUILT_EXTRA_DIST): Don't distribute glib-zip.
|
* Makefile.am (BUILT_EXTRA_DIST): Don't distribute glib-zip.
|
||||||
|
@@ -1,3 +1,11 @@
|
|||||||
|
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>
|
2003-01-04 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* Makefile.am (BUILT_EXTRA_DIST): Don't distribute glib-zip.
|
* Makefile.am (BUILT_EXTRA_DIST): Don't distribute glib-zip.
|
||||||
|
@@ -1,3 +1,11 @@
|
|||||||
|
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>
|
2003-01-04 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* Makefile.am (BUILT_EXTRA_DIST): Don't distribute glib-zip.
|
* Makefile.am (BUILT_EXTRA_DIST): Don't distribute glib-zip.
|
||||||
|
@@ -1,3 +1,11 @@
|
|||||||
|
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>
|
2003-01-04 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* Makefile.am (BUILT_EXTRA_DIST): Don't distribute glib-zip.
|
* Makefile.am (BUILT_EXTRA_DIST): Don't distribute glib-zip.
|
||||||
|
@@ -1,3 +1,11 @@
|
|||||||
|
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>
|
2003-01-04 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* Makefile.am (BUILT_EXTRA_DIST): Don't distribute glib-zip.
|
* Makefile.am (BUILT_EXTRA_DIST): Don't distribute glib-zip.
|
||||||
|
@@ -1,3 +1,11 @@
|
|||||||
|
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>
|
2003-01-04 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* Makefile.am (BUILT_EXTRA_DIST): Don't distribute glib-zip.
|
* Makefile.am (BUILT_EXTRA_DIST): Don't distribute glib-zip.
|
||||||
|
@@ -180,6 +180,15 @@ g_io_channel_read (GIOChannel *channel,
|
|||||||
g_return_val_if_fail (channel != NULL, G_IO_ERROR_UNKNOWN);
|
g_return_val_if_fail (channel != NULL, G_IO_ERROR_UNKNOWN);
|
||||||
g_return_val_if_fail (bytes_read != 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);
|
status = channel->funcs->io_read (channel, buf, count, bytes_read, &err);
|
||||||
|
|
||||||
error = g_io_error_get_from_g_error (status, err);
|
error = g_io_error_get_from_g_error (status, err);
|
||||||
@@ -550,7 +559,7 @@ g_io_channel_error_from_errno (gint en)
|
|||||||
|
|
||||||
#ifdef EFAULT
|
#ifdef EFAULT
|
||||||
case 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;
|
return G_IO_CHANNEL_ERROR_FAILED;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user