]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
keys: Fix intermittent buffer overflow when pasting text. From malice
authorcloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 24 Jan 2021 02:23:33 +0000 (02:23 +0000)
committerRudolf Polzer <divVerent@gmail.com>
Fri, 12 Mar 2021 20:44:58 +0000 (12:44 -0800)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@13092 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=6c3cfd667f00484beee8b27d663a55cd6b53b43b

keys.c

diff --git a/keys.c b/keys.c
index e93f83ac95504136e3605ce7a1ba0a15ae0faf67..deeb06674d67033b57a344e6ebdba320dc3025aa 100644 (file)
--- a/keys.c
+++ b/keys.c
@@ -743,7 +743,8 @@ Key_Console (int key, int unicode)
                                }
                                else if (*p == '\n' || *p == '\r' || *p == '\b')
                                        *p++ = ';';
-                               p++;
+                               else
+                                       p++;
                        }
 #else
                        strtok(cbd, "\n\r\b");