apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r932629 - /apr/apr/branches/1.4.x/file_io/win32/filepath.c
Date Fri, 09 Apr 2010 21:42:38 GMT
Author: trawick
Date: Fri Apr  9 21:42:38 2010
New Revision: 932629

URL: http://svn.apache.org/viewvc?rev=932629&view=rev
Log:
Merge r932067 from trunk:

avoid uninitialized memory access in apr_filepath_merge()

it was harmless other than triggering errors from tools
that check memory access

Submitted by: Arsen Chaloyan <achaloyan yahoo.com>
Reviewed by: trawick

Modified:
    apr/apr/branches/1.4.x/file_io/win32/filepath.c

Modified: apr/apr/branches/1.4.x/file_io/win32/filepath.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.4.x/file_io/win32/filepath.c?rev=932629&r1=932628&r2=932629&view=diff
==============================================================================
--- apr/apr/branches/1.4.x/file_io/win32/filepath.c (original)
+++ apr/apr/branches/1.4.x/file_io/win32/filepath.c Fri Apr  9 21:42:38 2010
@@ -949,8 +949,7 @@ APR_DECLARE(apr_status_t) apr_filepath_m
         }
     }
 
-    *newpath = apr_pmemdup(p, path, pathlen + 1);
-    (*newpath)[pathlen] = '\0';
+    *newpath = apr_pstrmemdup(p, path, pathlen);
     return APR_SUCCESS;
 }
 



Mime
View raw message