[PATCH] Fix array bounds violation in octet.cpp.
Dominik Vogt
dominik.vogt at external.thalesgroup.com
Thu Aug 19 08:15:59 CEST 2010
---
src/octet.cpp | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/src/octet.cpp b/src/octet.cpp
index c5fb693..c747747 100644
--- a/src/octet.cpp
+++ b/src/octet.cpp
@@ -801,9 +801,7 @@ bool OctetStr::set_linefeed_chars(const char* lf_chars)
if (!lf_chars) return false;
if (strlen(lf_chars) > 2) return false;
- linefeed_chars[2] = 0;
- linefeed_chars[1] = lf_chars[1];
- linefeed_chars[0] = lf_chars[0];
+ STRCPY(linefeed_chars, lf_chars);
return true;
}
--
1.5.5.6
--QTprm0S8XgL7H0Dt
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: attachment;
filename="0002-Fix-a-funny-assignment.patch"
More information about the AGENTPP
mailing list