bug-indent
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

indent-2.2.12 bug on large files


From: Michal Kalderon
Subject: indent-2.2.12 bug on large files
Date: Sun, 3 Jan 2021 14:13:02 +0000

Hi,

When running indent version 2.2.12 on a large file we get a failure in xrealloc 
function.
Root cause:

handletoken.c
func need_chars
bp->size = ((current_size + needed) & (size_t)~1023);

if the current size is "0" the result is "0" instead of being 1024 ( rounded up 
as in version 2.2.11 )
The solution is to use the ROUND_UP macro

Thanks,
Michal



reply via email to

[Prev in Thread] Current Thread [Next in Thread]