[php-maint] Bug#570287: [debian/debian-sid] Fix improper signed overflow detection in filter extension
Sean Finney
seanius at debian.org
Thu Feb 25 21:42:20 UTC 2010
tag 570287 pending
thanks
Date: Thu Feb 25 22:02:52 2010 +0100
Author: Sean Finney <seanius at debian.org>
Commit ID: 3061d111de130df7388cc78e26b63cc105574775
Commit URL: http://git.debian.org/?p=pkg-php/php.git;a=commitdiff;h=3061d111de130df7388cc78e26b63cc105574775
Patch URL: http://git.debian.org/?p=pkg-php/php.git;a=commitdiff_plain;h=3061d111de130df7388cc78e26b63cc105574775
Fix improper signed overflow detection in filter extension
The existing filter code relied on detecting invalid long integers by
examining computed values for wraparound. This is not defined behavior
in any C standard, and in fact recent versions of gcc will optimize out
such checks resulting in invalid code.
This patch therefore changes how the overflow/underflow conditions are
detected, using more reliable arithmetic. It also fixes another bug, that
the minimum integer value (-PHP_INT_MAX)-1 could not be detected properly.
This patch also includes an update to the test case that detects such
overflows, adding much more thorough and descriptive checking.
Closes: #570287
More information about the pkg-php-maint
mailing list