]> git.ipfire.org Git - thirdparty/lldpd.git/commit
client/tokenizer: heap-allocate the work buffer
authorVincent Bernat <bernat@luffy.cx>
Fri, 8 May 2026 21:11:41 +0000 (23:11 +0200)
committerVincent Bernat <vincent@bernat.ch>
Sat, 9 May 2026 13:26:12 +0000 (15:26 +0200)
commitee7c2bec7edbfb322a2f1f2b8ae0688be8a1608e
tree9ffad65f166291c110bf7d775cde71cbb4083a9e
parentc096e5de38797d89a438b1ac42ef55ec8c8d60af
client/tokenizer: heap-allocate the work buffer

Replace the variable-length array sized by 2 * strlen(line) + 3 with a
calloc()/free() pair. Long input lines (e.g. read from a config file)
could otherwise grow the stack without bound.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
src/client/tokenizer.c