regex: don't infloop on persistent failing calloc
authorJim Meyering <meyering@redhat.com>
Tue, 28 Dec 2010 14:12:47 +0000 (15:12 +0100)
committerJim Meyering <meyering@redhat.com>
Tue, 28 Dec 2010 14:16:28 +0000 (15:16 +0100)
commit028e437c6da50340f95b83978a25748e427012ae
treec7a04e130b6d12afc1e319aa5bcbb315553b2bff
parent37da693c0a2d4d84369d1910d258370ce65552ce
regex: don't infloop on persistent failing calloc

* lib/regexec.c (build_trtable): Return failure indication upon
calloc failure.  Otherwise, re_search_internal could infloop on OOM.
In glibc, this was fixed for version 2.13:
http://sourceware.org/bugzilla/show_bug.cgi?id=12348
ChangeLog
lib/regexec.c