harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r693415 - /harmony/enhanced/drlvm/trunk/vm/port/src/misc/linux/timezone.c
Date Tue, 09 Sep 2008 10:10:37 GMT
Author: hindessm
Date: Tue Sep  9 03:10:35 2008
New Revision: 693415

URL: http://svn.apache.org/viewvc?rev=693415&view=rev
Log:
If readlink copies sizeof(buf) characters then we have no '\0' so we must
restrict it to copy only sizeof(buf)-1.

Modified:
    harmony/enhanced/drlvm/trunk/vm/port/src/misc/linux/timezone.c

Modified: harmony/enhanced/drlvm/trunk/vm/port/src/misc/linux/timezone.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/port/src/misc/linux/timezone.c?rev=693415&r1=693414&r2=693415&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/port/src/misc/linux/timezone.c (original)
+++ harmony/enhanced/drlvm/trunk/vm/port/src/misc/linux/timezone.c Tue Sep  9 03:10:35 2008
@@ -130,7 +130,7 @@
 			&& APR_LNK == fi.filetype) {
 
 			memset(buf, 0, sizeof(buf));
-			if (readlink(cur_file, buf, sizeof(buf)) == -1) {
+			if (readlink(cur_file, buf, sizeof(buf)-1) == -1) {
 				break;
 			}
 			cur_file = buf;



Mime
View raw message