prevent an out of bounds access when pasting text.
problem hunted down and fix suggested by Deanna Phillips, thanks!
This commit is contained in:
parent
4d5b5bca77
commit
b9001d03e7
@ -1,10 +1,10 @@
|
||||
# $OpenBSD: Makefile,v 1.3 2006/10/30 09:57:20 steven Exp $
|
||||
# $OpenBSD: Makefile,v 1.4 2006/11/17 23:31:45 steven Exp $
|
||||
|
||||
COMMENT= "environment for rapid engineering and scientific processing"
|
||||
|
||||
VERSION= 2.0
|
||||
DISTNAME= FreeMat-${VERSION}
|
||||
PKGNAME= freemat-${VERSION}p0
|
||||
PKGNAME= freemat-${VERSION}p1
|
||||
|
||||
CATEGORIES= math
|
||||
|
||||
|
12
math/freemat/patches/patch-libs_libXP_KeyManager_cpp
Normal file
12
math/freemat/patches/patch-libs_libXP_KeyManager_cpp
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-libs_libXP_KeyManager_cpp,v 1.1 2006/11/17 23:31:45 steven Exp $
|
||||
--- libs/libXP/KeyManager.cpp.orig Sat Nov 18 00:12:35 2006
|
||||
+++ libs/libXP/KeyManager.cpp Sat Nov 18 00:13:14 2006
|
||||
@@ -136,7 +136,7 @@ int KeyManager::DisplayedStringWidth(std
|
||||
|
||||
void KeyManager::InsertString(int pos, std::string s) {
|
||||
int len = s.size();
|
||||
- for (int i=4096-len;i>pos;i--)
|
||||
+ for (int i=4096-len;i>pos && i>=len;i--)
|
||||
lineData[i] = lineData[i-len];
|
||||
const char* sptr = s.c_str();
|
||||
for (int i=0;i<len;i++)
|
Loading…
Reference in New Issue
Block a user