https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=15205

--- Comment #3 from Guy Harris <g...@alum.mit.edu> ---
(In reply to Stig Bjørlykke from comment #0)
> When a extcap utility returns an error with an error message on stderr
> ws_read_string_from_pipe() will loop infinite trying to fetch
> STDERR_BUFFER_SIZE (1024) bytes if error message is less than 1024.

It will loop until either 1) it reads all the data asked for *OR* 2) it gets an
EOF on the pipe.  If the extcap utility wrote less than STDERR_BUFFER_SIZE
bytes *and closes the pipe when it's finished writing the error message*, the
reader will get an EOF.

If it *can't* close the pipe because it might write more to the pipe, then the
entire pipe protocol is broken and needs to be changed so that an explicit
end-of-message indication at the end of the message, or an explicit message
length before the message, is used.

Do not assume that a single write on a pipe will turn into a single read of the
entire contents of the write.  Pipes are like TCP connections on UN*X - it's
just a data stream, with no message boundaries.

-- 
You are receiving this mail because:
You are watching all bug changes.
___________________________________________________________________________
Sent via:    Wireshark-bugs mailing list <wireshark-bugs@wireshark.org>
Archives:    https://www.wireshark.org/lists/wireshark-bugs
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-bugs
             mailto:wireshark-bugs-requ...@wireshark.org?subject=unsubscribe

Reply via email to