Re: mp4h: Strange? segfault problem
Svante Signell, le Wed 28 Dec 2011 10:17:24 +0100, a écrit :
> On GNU/Linux shortening the resolvedname vector from PATH_MAX to 64
> results in a stack corruption. This is not nice, but since that vector
> is allocated on the stack, maybe it is more acceptable than an
> environment corruption.
Well, this is not surprising to get crashes when cheating with PATH_MAX:
the kernel still thinks PATH_MAX is 4096, and thus thinks that the
buffer is actually 4096 bytes long, and thus happily overwrites whatever
is after it if userland doesn't make it so.
Samuel
Reply to: