I think a fix can be to check the result length of that split array, but I'm not sure what is the context here.
Raw crash
/home/ariel/afl-kisaten/private/sandbox/orgmode/org-ruby/lib/org-ruby/html_output_buffer.rb:172:in `flush!': undefined method `strip' for nil:NilClass (NoMethodError)
from /home/ariel/afl-kisaten/private/sandbox/orgmode/org-ruby/lib/org-ruby/parser.rb:393:in `translate'
from /home/ariel/afl-kisaten/private/sandbox/orgmode/org-ruby/lib/org-ruby/parser.rb:362:in `to_html'
from tst.rb:9:in `<main>'
I've been testing org-ruby with a Ruby fuzzing tool (kisaten) and found this bug. The failing code:
Results in a
NoMethodError
exception in theflush!
method where the following code does not return a 4 elements array as expected:I think a fix can be to check the result length of that split array, but I'm not sure what is the context here.
Raw crash
Input
The files causing this exception are binary, I uploaded them to gist.