Fix an off by one read error in drmSIGIOHandler().
Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>
This commit is contained in:
parent
ec0419b505
commit
6899ff81e8
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue