From 681cac65931c4778ada12289fa0aaec088f03a09 Mon Sep 17 00:00:00 2001 From: Alexandre Ratchov Date: Fri, 6 May 2011 12:12:25 +0200 Subject: [PATCH] don't read past the cookie end --- libsndio/aucat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libsndio/aucat.c b/libsndio/aucat.c index c334aa7..3dfed60 100644 --- a/libsndio/aucat.c +++ b/libsndio/aucat.c @@ -269,7 +269,7 @@ bad_gen: } len = AMSG_COOKIELEN; while (len > 0) { - n = read(fd, cookie, AMSG_COOKIELEN); + n = read(fd, cookie, len); if (n < 0) { DPERROR(DEV_RANDOM); close(fd);