[at-spi2-core] Fix inverted logic.
- From: Mike Gorse <mgorse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [at-spi2-core] Fix inverted logic.
- Date: Mon, 4 Dec 2017 16:08:25 +0000 (UTC)
commit b12d17b1d8cf15ab2de4b34b1a7e5d90904f744c
Author: Maya Rashish <maya NetBSD org>
Date: Sat Dec 2 13:24:29 2017 +0200
Fix inverted logic.
Don't write more into a buffer than it can hold.
https://bugzilla.gnome.org/show_bug.cgi?id=791124
bus/at-spi-bus-launcher.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/bus/at-spi-bus-launcher.c b/bus/at-spi-bus-launcher.c
index 261353f..eb2b8e3 100644
--- a/bus/at-spi-bus-launcher.c
+++ b/bus/at-spi-bus-launcher.c
@@ -244,7 +244,7 @@ unix_read_all_fd_to_string (int fd,
{
ssize_t bytes_read;
- while (max_bytes > 1 && (bytes_read = read (fd, buf, MAX (4096, max_bytes - 1))))
+ while (max_bytes > 1 && (bytes_read = read (fd, buf, MIN (4096, max_bytes - 1))))
{
if (bytes_read < 0)
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]