diff options
author | 2009-09-19 21:21:36 +0000 | |
---|---|---|
committer | 2009-09-19 21:21:36 +0000 | |
commit | 43543dfe6b2d4a6d40279a48f17ad64380747140 (patch) | |
tree | f1d4c5241dc3c904599b2b7baab793ce532a877f | |
parent | If UDLIO_DAMAGE fails to queue the damage drawing request, undo the (diff) | |
download | wireguard-openbsd-43543dfe6b2d4a6d40279a48f17ad64380747140.tar.xz wireguard-openbsd-43543dfe6b2d4a6d40279a48f17ad64380747140.zip |
if pipe_read() returns 0 we are at EOF and the structure describing
the pipe will be free()d, so don't try to access the structure.
ok ratchov
-rw-r--r-- | usr.bin/aucat/wav.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.bin/aucat/wav.c b/usr.bin/aucat/wav.c index e11e01ff3c5..0b7bfba6f8c 100644 --- a/usr.bin/aucat/wav.c +++ b/usr.bin/aucat/wav.c @@ -192,6 +192,8 @@ wav_read(struct file *file, unsigned char *data, unsigned count) } } n = pipe_read(file, data, count); + if (n == 0) + return 0; if (f->rbytes >= 0) f->rbytes -= n; if (f->map) { |