Closed kittener closed 1 month ago
Hi,
Thank you for reporting this issue and for the detailed description.
This issue has been fixed in the latest version of plutovg. I will update the submodule to the new version as soon as I have the time to do so.
Best regards
Thank you for your reply.
@kittener Resolved in the latest commit. Thank you for bringing this issue to our attention.
Hello, I am testing my new fuzz tester recently. I found a crash when testing example in this project.
Description
When running the application with AddressSanitizer, it crashes during a call to
plutovg_surface_create
due to a request to allocate an abnormally large amount of memory (0xffffffff83863c14
bytes). This behavior suggests there might be an integer overflow or an invalid memory size calculation.Steps to Reproduce
example poc.png
Expected Behavior
The application should handle memory allocation requests gracefully without attempting to allocate unusually large memory blocks.
Actual Behavior
The application requests an impractically large memory allocation and crashes when AddressSanitizer is enabled.
Environment
./configure
make
Possible Solution
plutovg_surface_create
that calculates the amount of memory needed.Additional Context
==5874==WARNING: AddressSanitizer failed to allocate 0xffffffff83863c14 bytes ==5874==AddressSanitizer's allocator is terminating the process instead of returning 0 ==5874==If you don't like this behavior set allocator_may_return_null=1 ==5874==AddressSanitizer CHECK failed: ../../../../src/libsanitizer/sanitizer_common/sanitizer_allocator.cc:218 "((0)) != (0)" (0x0, 0x0)
0 0x7fb364b39a02 (/lib/x86_64-linux-gnu/libasan.so.4+0xeaa02)
by kaiyu Xie