diff options
author | Anders Broman <anders.broman@ericsson.com> | 2012-11-05 09:18:43 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2012-11-05 09:18:43 +0000 |
commit | e57bf90ebeb17863f005f82009771510bb8b7362 (patch) | |
tree | 7067e0bc4fdb41911da0e3e653caf6a18c77c18e /capture_sync.c | |
parent | dc284b0c0492ed87a4e7d9bf83705d76f042b6e3 (diff) | |
download | wireshark-e57bf90ebeb17863f005f82009771510bb8b7362.tar.gz wireshark-e57bf90ebeb17863f005f82009771510bb8b7362.tar.bz2 wireshark-e57bf90ebeb17863f005f82009771510bb8b7362.zip |
From Bill Parker:
code fails to check/test return value from select()
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7861
svn path=/trunk/; revision=45917
Diffstat (limited to 'capture_sync.c')
-rw-r--r-- | capture_sync.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/capture_sync.c b/capture_sync.c index 2d071e7814..a1d0aa29bd 100644 --- a/capture_sync.c +++ b/capture_sync.c @@ -1575,6 +1575,10 @@ pipe_read_block(int pipe_fd, char *indicator, int len, char *msg, /* we have a problem here, try to read some more bytes from the pipe to debug where the problem really is */ memcpy(msg, header, sizeof(header)); newly = read(pipe_fd, &msg[sizeof(header)], len-sizeof(header)); + if (newly < 0) { /* error */ + g_log(LOG_DOMAIN_CAPTURE, G_LOG_LEVEL_DEBUG, + "read from pipe %d: error(%u): %s", pipe_fd, errno, g_strerror(errno)); + } *err_msg = g_strdup_printf("Unknown message from dumpcap, try to show it as a string: %s", msg); return -1; |