openbsd-ports/editors/scintilla/patches/patch-src_ExternalLexer_cxx
steven 134affccfd upgrade to 1.72
based on diffs from new maintainer Jeremy Evans <jeremyevans0 at gmail.com>
2007-01-18 10:56:27 +00:00

25 lines
730 B
Plaintext

$OpenBSD: patch-src_ExternalLexer_cxx,v 1.2 2007/01/18 10:56:27 steven Exp $
--- src/ExternalLexer.cxx.orig Tue Mar 28 17:31:51 2006
+++ src/ExternalLexer.cxx Tue Mar 28 17:31:51 2006
@@ -42,8 +42,9 @@ char **WordListsToStrings(WordList *val[
if (n != val[i]->len - 1)
words += " ";
}
- wls[i] = new char[words.length() + 1];
- strcpy(wls[i], words.c_str());
+ size_t wls_len = words.length() + 1;
+ wls[i] = new char[wls_len];
+ strlcpy(wls[i], words.c_str(), wls_len);
}
wls[dim] = 0;
return wls;
@@ -131,7 +132,7 @@ LexerLibrary::LexerLibrary(const char* M
// Assign a buffer for the lexer name.
char lexname[100];
- strcpy(lexname, "");
+ lexname[0] = 0;
int nl = GetLexerCount();