fixed buffer overflow on str
authortheStack <sebastian.falbesoner@gmail.com>
Thu, 24 Sep 2009 01:48:44 +0000 (03:48 +0200)
committertheStack <sebastian.falbesoner@gmail.com>
Thu, 24 Sep 2009 01:48:44 +0000 (03:48 +0200)
main.c

diff --git a/main.c b/main.c
index 2bc956f7c3532bddb1197fcb49090216e1bbb7b9..13524d596aecf14fbccb691affde6e0708ec04fe 100644 (file)
--- a/main.c
+++ b/main.c
@@ -148,7 +148,7 @@ int main(void)
        struct kbrep *k;
 
        while(1) {
-               memset(str, '\0', 8);
+               memset(str, '\0', 7);
                j=0;
                k = usb_hidkb_getChars();
                old_x = x; /* save actual x and y position for printing after the loop */