Fix an off by one read error in drmSIGIOHandler().

Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>
This commit is contained in:
Paulo Cesar Pereira de Andrade 2008-04-30 16:38:42 -03:00 committed by Peter Hutterer
parent ec0419b505
commit 6899ff81e8
1 changed files with 1 additions and 1 deletions

View File

@ -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);