openbsd-ports/editors/scintilla/patches/patch-src_ViewStyle_cxx
sturm a8ed68f4f2 Initial import of scintilla 1.54
Scintilla is a free source code editing component. As well as features
found in standard text editing components, Scintilla includes features
especially useful when editing and debugging source code. These include
support for syntax styling, error indicators, code completion and call
tips. The selection margin can contain markers like those used in debuggers
to indicate breakpoints and the current line. Styling choices are more open
than with many editors, allowing the use of proportional fonts, bold and
italics, multiple foreground and background colours and multiple fonts.

WWW: http://www.scintilla.org/

from Joerg Sonnenberger <joerg@bec.de> with patches from Andrew Dalgleisch
2003-08-14 18:24:30 +00:00

16 lines
504 B
Plaintext

$OpenBSD: patch-src_ViewStyle_cxx,v 1.1.1.1 2003/08/14 18:24:31 sturm Exp $
--- src/ViewStyle.cxx.orig 2003-08-13 17:04:03.000000000 +1000
+++ src/ViewStyle.cxx 2003-08-13 17:27:33.000000000 +1000
@@ -44,8 +44,9 @@ const char *FontNames::Save(const char *
return names[i];
}
}
- names[max] = new char[strlen(name) + 1];
- strcpy(names[max], name);
+ size_t name_len = strlen(name) + 1;
+ names[max] = new char[name_len];
+ strlcpy(names[max], name, name_len);
max++;
return names[max-1];
}