134affccfd
based on diffs from new maintainer Jeremy Evans <jeremyevans0 at gmail.com>
18 lines
559 B
Plaintext
18 lines
559 B
Plaintext
$OpenBSD: patch-src_CallTip_cxx,v 1.2 2007/01/18 10:56:27 steven Exp $
|
|
--- src/CallTip.cxx.orig Tue Mar 28 17:31:51 2006
|
|
+++ src/CallTip.cxx Tue Mar 28 17:31:51 2006
|
|
@@ -241,10 +241,11 @@ PRectangle CallTip::CallTipStart(int pos
|
|
clickPlace = 0;
|
|
if (val)
|
|
delete []val;
|
|
- val = new char[strlen(defn) + 1];
|
|
+ size_t val_len = strlen(defn) + 1;
|
|
+ val = new char[val_len];
|
|
if (!val)
|
|
return PRectangle();
|
|
- strcpy(val, defn);
|
|
+ strlcpy(val, defn, val_len);
|
|
codePage = codePage_;
|
|
Surface *surfaceMeasure = Surface::Allocate();
|
|
if (!surfaceMeasure)
|