elharo opened a new issue, #390:
URL: https://github.com/apache/maven-help-plugin/issues/390

   In src/main/java/org/apache/maven/plugins/help/DescribeMojo.java:747-778:
   
   Method m = HelpMojo.class.getDeclaredMethod("toLines", String.class, 
Integer.TYPE, Integer.TYPE, Integer.TYPE);
   m.setAccessible(true);
   List<String> output = (List<String>) m.invoke(HelpMojo.class, text, indent, 
indentSize, lineLength);
   
   HelpMojo is generated by maven-plugin-tools at compile time (in 
target/generated-sources/). It IS available at runtime, but this reflection is 
brittle: any change in the generated code toLines signature silently breaks all 
describe output formatting. The HelpMojo.toLines internally calls repeat() with 
new StringBuilder(repeat * str.length()) — a classic integer overflow risk that 
can throw NegativeArraySizeException.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to