harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From odea...@apache.org
Subject svn commit: r786493 - /harmony/enhanced/classlib/trunk/modules/portlib/src/test/native/hymmap/shared/hymmap.c
Date Fri, 19 Jun 2009 13:07:23 GMT
Author: odeakin
Date: Fri Jun 19 13:07:23 2009
New Revision: 786493

URL: http://svn.apache.org/viewvc?rev=786493&view=rev
Log:
Apply fix for mmap test case - strncpy() does not add a null terminator when copying a substring,
which can cause problems for the subsequent strcat(), so add the terminator ourselves.

Modified:
    harmony/enhanced/classlib/trunk/modules/portlib/src/test/native/hymmap/shared/hymmap.c

Modified: harmony/enhanced/classlib/trunk/modules/portlib/src/test/native/hymmap/shared/hymmap.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/test/native/hymmap/shared/hymmap.c?rev=786493&r1=786492&r2=786493&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/test/native/hymmap/shared/hymmap.c
(original)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/test/native/hymmap/shared/hymmap.c
Fri Jun 19 13:07:23 2009
@@ -130,6 +130,7 @@
     testFile = hyportLibrary->mem_allocate_memory(hyportLibrary, pathLen + strlen("shared")
+ 2 + strlen("testFile"));
 
     strncpy(emptyFile, execPath, pathLen);
+    emptyFile[pathLen] = '\0';
     strcat(emptyFile, "shared");
     strcat(emptyFile, DIR_SEPARATOR_STR);
     strcpy(testFile, emptyFile);



Mime
View raw message