Comment 43 for bug 20215

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Wed, 24 Aug 2005 22:18:34 +0200
From: Florian Weimer <email address hidden>
To: Sven Mueller <email address hidden>
Cc: <email address hidden>, Stefan Fritsch <email address hidden>
Subject: Re: Bug#324531: pcre3: CAN-2005-2491

* Sven Mueller:

> +/* Read the minimum value and do a paranoid check: a negative value indicates
> +an integer overflow. */
> +
> while ((digitab[*p] & ctype_digit) != 0) min = min * 10 + *p++ - '0';
> +if (min < 0 || min > 65535)

This doesn't work. Signed integer overflow is undefined. Future GCC
version are likely to detect that the "min < 0" test is superfluous as
a result, and will optimize it away.