diff options
author | Maya Rashish <maya@NetBSD.org> | 2017-12-02 13:24:29 +0200 |
---|---|---|
committer | Mike Gorse <mgorse@alum.wpi.edu> | 2017-12-04 10:12:08 -0600 |
commit | b952b8f6c8ac7fad13cb78fe30202a1130007b41 (patch) | |
tree | abfda138125c507ae081818462a91d96e6ded097 | |
parent | 1519b10d7f529454fe5e791df21fe8c882fb404e (diff) | |
download | at-spi2-core-gnome-3-22.tar.gz |
Fix inverted logic.gnome-3-22
Don't write more into a buffer than it can hold.
https://bugzilla.gnome.org/show_bug.cgi?id=791124
-rw-r--r-- | 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 51251808..8d932c27 100644 --- a/bus/at-spi-bus-launcher.c +++ b/bus/at-spi-bus-launcher.c @@ -296,7 +296,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; |