mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-12 13:49:22 +01:00
avoid creating negative values out of unsigned values using MAX, check to
Fri Oct 18 13:41:30 2002 Manish Singh <yosh@gimp.org> * glib/giochannel.c (g_io_channel_read_line_backend): avoid creating negative values out of unsigned values using MAX, check to see if the result would be positive before doing the calculation.
This commit is contained in:
parent
ac1080ee3b
commit
55a39b8033
@ -1,3 +1,10 @@
|
|||||||
|
Fri Oct 18 13:41:30 2002 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* glib/giochannel.c (g_io_channel_read_line_backend): avoid
|
||||||
|
creating negative values out of unsigned values using MAX,
|
||||||
|
check to see if the result would be positive before doing
|
||||||
|
the calculation.
|
||||||
|
|
||||||
Tue Oct 15 15:28:47 2002 Manish Singh <yosh@gimp.org>
|
Tue Oct 15 15:28:47 2002 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
* tests/iochannel-test.c: use gsize instead of int where appropriate
|
* tests/iochannel-test.c: use gsize instead of int where appropriate
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
Fri Oct 18 13:41:30 2002 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* glib/giochannel.c (g_io_channel_read_line_backend): avoid
|
||||||
|
creating negative values out of unsigned values using MAX,
|
||||||
|
check to see if the result would be positive before doing
|
||||||
|
the calculation.
|
||||||
|
|
||||||
Tue Oct 15 15:28:47 2002 Manish Singh <yosh@gimp.org>
|
Tue Oct 15 15:28:47 2002 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
* tests/iochannel-test.c: use gsize instead of int where appropriate
|
* tests/iochannel-test.c: use gsize instead of int where appropriate
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
Fri Oct 18 13:41:30 2002 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* glib/giochannel.c (g_io_channel_read_line_backend): avoid
|
||||||
|
creating negative values out of unsigned values using MAX,
|
||||||
|
check to see if the result would be positive before doing
|
||||||
|
the calculation.
|
||||||
|
|
||||||
Tue Oct 15 15:28:47 2002 Manish Singh <yosh@gimp.org>
|
Tue Oct 15 15:28:47 2002 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
* tests/iochannel-test.c: use gsize instead of int where appropriate
|
* tests/iochannel-test.c: use gsize instead of int where appropriate
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
Fri Oct 18 13:41:30 2002 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* glib/giochannel.c (g_io_channel_read_line_backend): avoid
|
||||||
|
creating negative values out of unsigned values using MAX,
|
||||||
|
check to see if the result would be positive before doing
|
||||||
|
the calculation.
|
||||||
|
|
||||||
Tue Oct 15 15:28:47 2002 Manish Singh <yosh@gimp.org>
|
Tue Oct 15 15:28:47 2002 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
* tests/iochannel-test.c: use gsize instead of int where appropriate
|
* tests/iochannel-test.c: use gsize instead of int where appropriate
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
Fri Oct 18 13:41:30 2002 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* glib/giochannel.c (g_io_channel_read_line_backend): avoid
|
||||||
|
creating negative values out of unsigned values using MAX,
|
||||||
|
check to see if the result would be positive before doing
|
||||||
|
the calculation.
|
||||||
|
|
||||||
Tue Oct 15 15:28:47 2002 Manish Singh <yosh@gimp.org>
|
Tue Oct 15 15:28:47 2002 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
* tests/iochannel-test.c: use gsize instead of int where appropriate
|
* tests/iochannel-test.c: use gsize instead of int where appropriate
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
Fri Oct 18 13:41:30 2002 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* glib/giochannel.c (g_io_channel_read_line_backend): avoid
|
||||||
|
creating negative values out of unsigned values using MAX,
|
||||||
|
check to see if the result would be positive before doing
|
||||||
|
the calculation.
|
||||||
|
|
||||||
Tue Oct 15 15:28:47 2002 Manish Singh <yosh@gimp.org>
|
Tue Oct 15 15:28:47 2002 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
* tests/iochannel-test.c: use gsize instead of int where appropriate
|
* tests/iochannel-test.c: use gsize instead of int where appropriate
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
Fri Oct 18 13:41:30 2002 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* glib/giochannel.c (g_io_channel_read_line_backend): avoid
|
||||||
|
creating negative values out of unsigned values using MAX,
|
||||||
|
check to see if the result would be positive before doing
|
||||||
|
the calculation.
|
||||||
|
|
||||||
Tue Oct 15 15:28:47 2002 Manish Singh <yosh@gimp.org>
|
Tue Oct 15 15:28:47 2002 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
* tests/iochannel-test.c: use gsize instead of int where appropriate
|
* tests/iochannel-test.c: use gsize instead of int where appropriate
|
||||||
|
@ -1600,7 +1600,10 @@ read_again:
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
checked_to = MAX (use_buf->len - (line_term_len - 1), 0);
|
if (use_buf->len > line_term_len - 1)
|
||||||
|
checked_to = use_buf->len - (line_term_len - 1);
|
||||||
|
else
|
||||||
|
checked_to = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user