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

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

gawk 3.1.3l: write beyond array bounds


From: Andreas Schwab
Subject: gawk 3.1.3l: write beyond array bounds
Date: Fri, 06 Aug 2004 16:55:19 +0200
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux)

GAWK's private implementation of random writes beyond array bounds if
sizeof(long) > 4.  This has been corrected in Glibc's version of random,
which uses int32_t instead of long throughout.  Previously, the state
array was big enough for sizeof(long) == 8, but the following change broke
that:

Sun Sep 21 18:34:32 2003  Arnold D. Robbins  <address@hidden>

        * builtin.c (state): Only needs to be 256 bytes, initstate() can't
        use any more than that.  Well whadayaknow.

But the real bug is in initstate, it doesn't correctly check the array
bounds.

Andreas.

-- 
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




reply via email to

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