apache/tomcat-native — pull request #1 by ivmaykov (2012-02-03 02:25:51+00:00)
Title: Fixed a bug with File.infoGet() and File.getInfo() methods that sometime...

...s caused segfaults

The problem is that the stack-allocated info structure is not being zeroed-out before the call to apr_file_info_get(). That function doesn't seem to zero it out either, and only sets the requested fields. As a result, the string pointers info->fname and info->name can point at random memory locations, which can crash the JVM with a segfault when it attempts to copy the file info fields from the C struct to the Java FileInfo instance in fill_finfo() - specifically, the NewStringUTF() call that copies the fname and name strings.