apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r932067 - /apr/apr/trunk/file_io/win32/filepath.c
Date Thu, 08 Apr 2010 19:15:24 GMT
Author: trawick
Date: Thu Apr  8 19:15:24 2010
New Revision: 932067

URL: http://svn.apache.org/viewvc?rev=932067&view=rev
Log:
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/trunk/file_io/win32/filepath.c

Modified: apr/apr/trunk/file_io/win32/filepath.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/win32/filepath.c?rev=932067&r1=932066&r2=932067&view=diff
==============================================================================
--- apr/apr/trunk/file_io/win32/filepath.c (original)
+++ apr/apr/trunk/file_io/win32/filepath.c Thu Apr  8 19:15:24 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