harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r693418 - /harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/IpfEmitter.cpp
Date Tue, 09 Sep 2008 10:18:17 GMT
Author: hindessm
Date: Tue Sep  9 03:18:16 2008
New Revision: 693418

URL: http://svn.apache.org/viewvc?rev=693418&view=rev
Log:
Avoid potential buffer overflow.

Modified:
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/IpfEmitter.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/IpfEmitter.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/IpfEmitter.cpp?rev=693418&r1=693417&r2=693418&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/IpfEmitter.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/IpfEmitter.cpp Tue Sep 
9 03:18:16 2008
@@ -1418,7 +1418,7 @@
         string sz("");
         int len = 0;
 
-        len = readlink("/proc/self/exe", buf, sizeof(buf));
+        len = readlink("/proc/self/exe", buf, sizeof(buf)-1);
         if (len < 0) {
             buf[0]='.';
             buf[1]='/';



Mime
View raw message