bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#5526: 23.1; (master) - charset.c possible unwise use of alloca(3)


From: Chong Yidong
Subject: bug#5526: 23.1; (master) - charset.c possible unwise use of alloca(3)
Date: Thu, 04 Feb 2010 23:15:04 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.92 (gnu/linux)

Vivek Dasmohapatra <address@hidden> writes:

> In src/charset.c, in load_charset_map_from_file (and .._vector)
> alloca is used to allocate sizeof (struct charset_map_entries) bytes:
> which is 786436 bytes - this segfaults while building in a qemu-armel
> scratchbox (alloca does not return an error, so its return value cannot
> be checked).
>
> In any case, this is more than MAX_ALLOCA, and can occur several times
> in a while(1) loop in the same function.

Thanks for pointing this out.  I have changed it to use the heap
instead.






reply via email to

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