]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/cris/arch-v10/kernel/kgdb.c
cris/kgdb: Fix buffer overflow in getpacket()
[karo-tx-linux.git] / arch / cris / arch-v10 / kernel / kgdb.c
index d0b6257afc2cc72a7f9f6f5e3e5ff10a9bc04605..0e799073498da433391788c2dd44a0482298cf3d 100644 (file)
@@ -523,7 +523,7 @@ getpacket (char *buffer)
                xmitcsum = -1;
                count = 0;
                /* Read until a # or the end of the buffer is reached */
-               while (count < BUFMAX) {
+               while (count < BUFMAX - 1) {
                        ch = getDebugChar ();
                        if (ch == '#')
                                break;