[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gawk: do_match() invalid read
From: |
Dmitry V. Levin |
Subject: |
gawk: do_match() invalid read |
Date: |
Mon, 18 Dec 2006 18:38:13 +0300 |
Hi,
Due to missing mounds check, do_match() may do invalid read in multibyte
locales:
$ printf '\n\n' |env -i gawk '{print match(""," *")}'
1
1
$ printf '\n\n' |env -i LC_ALL=ru_RU.UTF-8 gawk '{print match(""," *")}'
-1208299079
134843273
As you see, match() output in multibyte locale is wrong; valgrind reports
about "Invalid read of size 4".
Proposed fix is attached.
--
ldv
gawk-3.1.5-alt-do_match.diff
Description: Text document
pgpeqcqJivJVp.pgp
Description: PGP signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gawk: do_match() invalid read,
Dmitry V. Levin <=