mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-21 05:18:06 +01:00
Coverity pointed that the "text" returned by WMGetTextFieldText was never freed (CID #331578, because WMSetTextFieldText does its own copy, it does not take the pointer as-is). By looking at the code, there is also a potential buffer overflow because the buffer alloc'd for "value" is sized for the exact number of digits before increase, but the +delta can make the number use more digits so we may write past the end of original buffer. We write to a stack-allocated one, so it does not cost anything and does not participates to memory fragmentation. Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
10 KiB
10 KiB