|
From: | Paul Eggert |
Subject: | Re: Regular expression libraries |
Date: | Fri, 16 Dec 2016 09:43:55 -0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 |
Clément Pit–Claudel wrote:
the last check (len < length1) was added to "avoid overflow in computing sum of lengths". But I thought int overflow was undefined behaviour, so why does the len < length1 check make sense?
You're right, it doesn't. I fixed this by installing the attached patch into Gnulib. You should look at the Gnulib version and not the glibc version: Gnulib regex has portability and other fixes that glibc regex doesn't. I never have gotten up the energy to propagate the Gnulib fixes back into glibc.
0001-regex-fix-integer-overflow-bug-in-never-used-code.txt
Description: Text document
[Prev in Thread] | Current Thread | [Next in Thread] |