harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r693402 - /harmony/enhanced/jdktools/trunk/modules/samsa/src/main/native/samsa/samsa.c
Date Tue, 09 Sep 2008 08:26:13 GMT
Author: hindessm
Date: Tue Sep  9 01:26:12 2008
New Revision: 693402

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

Modified:
    harmony/enhanced/jdktools/trunk/modules/samsa/src/main/native/samsa/samsa.c

Modified: harmony/enhanced/jdktools/trunk/modules/samsa/src/main/native/samsa/samsa.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/modules/samsa/src/main/native/samsa/samsa.c?rev=693402&r1=693401&r2=693402&view=diff
==============================================================================
--- harmony/enhanced/jdktools/trunk/modules/samsa/src/main/native/samsa/samsa.c (original)
+++ harmony/enhanced/jdktools/trunk/modules/samsa/src/main/native/samsa/samsa.c Tue Sep  9
01:26:12 2008
@@ -421,7 +421,7 @@
 #if defined(LINUX)
     char buffer[PATH_MAX + 1];
     
-    int size = readlink ("/proc/self/exe", buffer, sizeof(buffer)-1);
+    int size = readlink ("/proc/self/exe", buffer, sizeof(buffer)-2);
     
     buffer[size+1] = '\0';
 #elif defined(FREEBSD)



Mime
View raw message