Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP4:Update
xen.14030
CVE-2018-18438-qemuu-003-integer-overflow-in-cc...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File CVE-2018-18438-qemuu-003-integer-overflow-in-ccid_card_vscard_read-allows-memory-corruption.patch of Package xen.14030
References: bsc#1112188 CVE-2018-18438 IOWatchPoll::fd_can_read() simply returns a boolean value. Suggested-by: Paolo Bonzini <address@hidden> Signed-off-by: Philippe Mathieu-Daudé <address@hidden> --- chardev/char-fd.c | 4 ++-- chardev/char-io.c | 4 ++-- chardev/char-pty.c | 4 ++-- chardev/char-socket.c | 6 +++--- chardev/char-udp.c | 4 ++-- include/chardev/char-io.h | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) Index: xen-4.5.5-testing/tools/qemu-xen-dir-remote/qemu-char.c =================================================================== --- xen-4.5.5-testing.orig/tools/qemu-xen-dir-remote/qemu-char.c +++ xen-4.5.5-testing/tools/qemu-xen-dir-remote/qemu-char.c @@ -623,7 +623,7 @@ typedef struct IOWatchPoll GIOChannel *channel; GSource *src; - IOCanReadHandler *fd_can_read; + GSourceFunc fd_can_read; GSourceFunc fd_read; void *opaque; } IOWatchPoll; @@ -690,7 +690,7 @@ static GSourceFuncs io_watch_poll_funcs /* Can only be used for read */ static guint io_add_watch_poll(GIOChannel *channel, - IOCanReadHandler *fd_can_read, + GSourceFunc fd_can_read, GIOFunc fd_read, gpointer user_data) { @@ -857,7 +857,7 @@ static int fd_chr_read_poll(void *opaque FDCharDriver *s = chr->opaque; s->max_size = qemu_chr_be_can_write(chr); - return s->max_size; + return s->max_size > 0; } static GSource *fd_chr_add_watch(CharDriverState *chr, GIOCondition cond) @@ -1067,13 +1067,13 @@ static GSource *pty_chr_add_watch(CharDr return g_io_create_watch(s->fd, cond); } -static int pty_chr_read_poll(void *opaque) +static gboolean pty_chr_read_poll(void *opaque) { CharDriverState *chr = opaque; PtyCharDriver *s = chr->opaque; s->read_bytes = qemu_chr_be_can_write(chr); - return s->read_bytes; + return s->read_bytes > 0; } static gboolean pty_chr_read(GIOChannel *chan, GIOCondition cond, void *opaque) @@ -1758,7 +1758,7 @@ static int win_chr_read_poll(CharDriverS WinCharState *s = chr->opaque; s->max_size = qemu_chr_be_can_write(chr); - return s->max_size; + return s->max_size > 0; } static void win_chr_readfile(CharDriverState *chr) @@ -2177,7 +2177,7 @@ static int udp_chr_write(CharDriverState return bytes_written; } -static int udp_chr_read_poll(void *opaque) +static gboolean udp_chr_read_poll(void *opaque) { CharDriverState *chr = opaque; NetCharDriver *s = chr->opaque; @@ -2192,7 +2192,7 @@ static int udp_chr_read_poll(void *opaqu s->bufptr++; s->max_size = qemu_chr_be_can_write(chr); } - return s->max_size; + return s->max_size > 0; } static gboolean udp_chr_read(GIOChannel *chan, GIOCondition cond, void *opaque) @@ -2312,14 +2312,14 @@ static int tcp_chr_write(CharDriverState } } -static int tcp_chr_read_poll(void *opaque) +static gboolean tcp_chr_read_poll(void *opaque) { CharDriverState *chr = opaque; TCPCharDriver *s = chr->opaque; if (!s->connected) return 0; s->max_size = qemu_chr_be_can_write(chr); - return s->max_size; + return s->max_size > 0; } #define IAC 255
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor