Resource file of zero-length module name and package name should not be allowed to be written to jimage. The moduleName > 0 and packageName > 0 should be an assertion; exception if fails.
Mandy > On Oct 29, 2015, at 1:09 PM, Dmitry Samersoff <dmitry.samers...@oracle.com> > wrote: > > Roger, > > ImageNativeSubstrate.cpp:565 > > two extra bytes is accounted if moduleLen == 0 > > Please, add examples of valid resource name when moduleLen == 0 and/or > packageLen == 0 to comments. > > > -Dmitry > > On 2015-10-28 09:40, Roger Riggs wrote: >> Please review an update to the jimage reader implementation to correct the >> case where a class name is very long causing a SEGV due to buffer overruns. >> >> The fix will be pushed to the hs-comp repo; the bug was first spotted >> there. >> >> Webrev: >> http://cr.openjdk.java.net/~rriggs//webrev-jimage-segv-8139390 >> >> Issue: >> https://bugs.openjdk.java.net/browse/JDK-8139390 >> >> Thanks, Roger >> > > > -- > Dmitry Samersoff > Oracle Java development team, Saint Petersburg, Russia > * I would love to change the world, but they won't give me the sources.