You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2017/01/31 19:58:37 UTC

svn commit: r1781157 - in /tomcat/native/trunk: native/src/info.c xdocs/miscellaneous/changelog.xml

Author: markt
Date: Tue Jan 31 19:58:37 2017
New Revision: 1781157

URL: http://svn.apache.org/viewvc?rev=1781157&view=rev
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=52627
Prevent a crash in File.infoGet()</code> caused by the use of uninitialised variables.
Based on patch by Ilya Maykov.

Modified:
    tomcat/native/trunk/native/src/info.c
    tomcat/native/trunk/xdocs/miscellaneous/changelog.xml

Modified: tomcat/native/trunk/native/src/info.c
URL: http://svn.apache.org/viewvc/tomcat/native/trunk/native/src/info.c?rev=1781157&r1=1781156&r2=1781157&view=diff
==============================================================================
--- tomcat/native/trunk/native/src/info.c (original)
+++ tomcat/native/trunk/native/src/info.c Tue Jan 31 19:58:37 2017
@@ -216,7 +216,7 @@ TCN_IMPLEMENT_CALL(jint, File, stat)(TCN
     apr_pool_t *p = J2P(pool, apr_pool_t *);
     TCN_ALLOC_CSTRING(fname);
     apr_status_t rv;
-    apr_finfo_t info;
+    apr_finfo_t info = {0};
 
     UNREFERENCED(o);
 
@@ -235,7 +235,7 @@ TCN_IMPLEMENT_CALL(jobject, File, getSta
     apr_pool_t *p = J2P(pool, apr_pool_t *);
     TCN_ALLOC_CSTRING(fname);
     apr_status_t rv;
-    apr_finfo_t info;
+    apr_finfo_t info = {0};
     jobject finfo = NULL;
 
     UNREFERENCED(o);
@@ -258,7 +258,7 @@ TCN_IMPLEMENT_CALL(jint, File, infoGet)(
 {
     apr_file_t *f = J2P(file, apr_file_t *);
     apr_status_t rv;
-    apr_finfo_t info;
+    apr_finfo_t info = {0};
 
     UNREFERENCED(o);
 
@@ -274,7 +274,7 @@ TCN_IMPLEMENT_CALL(jobject, File, getInf
 {
     apr_file_t *f = J2P(file, apr_file_t *);
     apr_status_t rv;
-    apr_finfo_t  info;
+    apr_finfo_t  info = {0};
 
     UNREFERENCED(o);
 
@@ -296,7 +296,7 @@ TCN_IMPLEMENT_CALL(jint, Directory, read
 {
     apr_dir_t *d = J2P(dir, apr_dir_t *);
     apr_status_t rv;
-    apr_finfo_t info;
+    apr_finfo_t info = {0};
 
     UNREFERENCED(o);
 

Modified: tomcat/native/trunk/xdocs/miscellaneous/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/native/trunk/xdocs/miscellaneous/changelog.xml?rev=1781157&r1=1781156&r2=1781157&view=diff
==============================================================================
--- tomcat/native/trunk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/native/trunk/xdocs/miscellaneous/changelog.xml Tue Jan 31 19:58:37 2017
@@ -37,6 +37,10 @@
 <section name="Changes in 1.2.11">
   <changelog>
     <fix>
+      <bug>52627</bug>: Prevent a crash in <code>File.infoGet()</code> caused by
+      the use of uninitialised variables. Based on patch by Ilya Maykov. (markt)
+    </fix>
+    <fix>
       <bug>55114</bug>: Clean up building instructions for the native component
       and expand the instructions for building for Windows platforms. (markt)
     </fix>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org