From 259ac57361fa7356e851b13e448cabf99caef848 Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Fri, 6 Jun 2008 14:42:53 -0600 Subject: [PATCH] Fix buffer overrun (thanks abrugh!) --- xkeygrab.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xkeygrab.c b/xkeygrab.c index 8810e5d..dbb21df 100644 --- a/xkeygrab.c +++ b/xkeygrab.c @@ -107,6 +107,10 @@ main(int argc, char *argv[]) } break; } + if (obuflen == sizeof(obuf)) { + (void)write(STDOUT_FILENO, obuf, obuflen); + obuflen = 0; + } } } }