diff options
author | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2008-04-30 16:38:42 -0300 |
---|---|---|
committer | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-05-01 10:14:30 +0930 |
commit | 6899ff81e8f668382e3e2f9afdd9cdf51d0e0f7d (patch) | |
tree | a50d194e4421139d042b4892ecf643609b73bc1b | |
parent | ec0419b50534006a272278b79ee51538193661cb (diff) |
Fix an off by one read error in drmSIGIOHandler().
Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>
-rw-r--r-- | hw/xfree86/dri/dri.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c index b736c6ae0..ef1a6ea0a 100644 --- a/hw/xfree86/dri/dri.c +++ b/hw/xfree86/dri/dri.c @@ -2436,7 +2436,7 @@ static void drmSIGIOHandler(int interrupt, void *closure) #if 0 fprintf(stderr, "Trying %d\n", entry->fd); #endif - if ((count = read(entry->fd, buf, sizeof(buf))) > 0) { + if ((count = read(entry->fd, buf, sizeof(buf) - 1)) > 0) { buf[count] = '\0'; #if 0 fprintf(stderr, "Got %s\n", buf); |