Skip to content

Restore the ROUND_UP macro and adjust the initial buffer size.

When need_chars was moved from "handletoken.h" to "handletoken.c", the ROUND_UP macro was removed, but the replacement was incorrect.

This caused the program to exit with a "Virtual memory exhausted" error when it tried to reallocate 0 bytes (thus freeing the memory). It reallocated to 0 bytes because the initial buffer size was less than 1024, and the size calculation rounds down instead of up.

Bug: #56644 Fixes: c89d32a


Apply patch from post-2.2.12 upstream to fix crash on long comments

Merge request reports