aboutsummaryrefslogtreecommitdiff
path: root/src/clint.py
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-01-31 17:42:22 +0100
committerGitHub <noreply@github.com>2017-01-31 17:42:22 +0100
commit88bc9f8e92903700494486fe383c6b94eef80f3f (patch)
treeb736bd8715d34dc70be60687967a525da0ca39f5 /src/clint.py
parentd25649fa012013b9ee5b048c8272db4dd50191d6 (diff)
downloadrneovim-88bc9f8e92903700494486fe383c6b94eef80f3f.tar.gz
rneovim-88bc9f8e92903700494486fe383c6b94eef80f3f.tar.bz2
rneovim-88bc9f8e92903700494486fe383c6b94eef80f3f.zip
xstrlcat: Allow overlapped pointers. (#6017)
memcpy is not equivalent to memmove (which is used by vim_strcat), this could cause subtle bugs if xstrlcat is used as a replacement for vim_strcat. But vim_strcat is inconsistent: in the `else` branch it uses strcpy, which doesn't allow overlap. Helped-by: oni-link <knil.ino@gmail.com> Helped-by: James McCoy <jamessan@jamessan.com> Helped-by: Nikolai Aleksandrovich Pavlov <kp-pav@yandex.ru>
Diffstat (limited to 'src/clint.py')
-rwxr-xr-xsrc/clint.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/clint.py b/src/clint.py
index 4fa78d3c82..ce31822ada 100755
--- a/src/clint.py
+++ b/src/clint.py
@@ -3176,7 +3176,7 @@ def CheckLanguage(filename, clean_lines, linenum, file_extension,
if match:
error(filename, linenum, 'runtime/printf', 4,
'Use xstrlcpy or snprintf instead of %s' % match.group(1))
- match = Search(r'\b(STRNCAT|strncat|strcat)\b', line)
+ match = Search(r'\b(STRNCAT|strncat|strcat|vim_strcat)\b', line)
if match:
error(filename, linenum, 'runtime/printf', 4,
'Use xstrlcat or snprintf instead of %s' % match.group(1))