diff options
author | Remi Collet <fedora@famillecollet.com> | 2013-04-20 09:20:06 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2013-04-20 09:20:06 +0200 |
commit | 4ac4e5a0faa01e82bf950eb72a2a0caa96da2662 (patch) | |
tree | 162a08732d7e6c2c6e9411197cead31486940233 | |
parent | ea0bc3ad2c947a19b3f7f53943ff9d45a130c0b5 (diff) |
php-pecl-event: fix buffer overflow
-rw-r--r-- | event.patch | 11 | ||||
-rw-r--r-- | php-pecl-event.spec | 18 |
2 files changed, 24 insertions, 5 deletions
diff --git a/event.patch b/event.patch new file mode 100644 index 0000000..8e465ba --- /dev/null +++ b/event.patch @@ -0,0 +1,11 @@ +--- event-1.6.1/classes/listener.c~ 2013-04-17 21:04:23.000000000 +0200 ++++ event-1.6.1/classes/listener.c 2013-04-20 09:11:52.608891682 +0200 +@@ -272,7 +272,7 @@ + PHP_EVENT_FETCH_BASE(base, zbase); + + if (Z_TYPE_PP(ppztarget) == IS_STRING) { +- struct sockaddr_storage *ss; ++ struct sockaddr_storage ss; + socklen_t ss_len = sizeof(ss); + memset(&ss, 0, sizeof(ss)); + diff --git a/php-pecl-event.spec b/php-pecl-event.spec index 60cfd73..d8ec615 100644 --- a/php-pecl-event.spec +++ b/php-pecl-event.spec @@ -10,7 +10,10 @@ Release: 1%{?dist} License: PHP Group: Development/Languages URL: http://pecl.php.net/package/event -Source: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz +Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz + +# https://bugs.php.net/64679 +Patch0: %{pecl_name}.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: php-devel > 5.4 @@ -58,6 +61,8 @@ Version 1.0.0 introduces: cd %{pecl_name}-%{version} +%patch0 -p1 -b .orig + # Sanity check, really often broken extver=$(sed -n '/#define PHP_EVENT_VERSION/{s/.* "//;s/".*$//;p}' php_event.h) if test "x${extver}" != "x%{version}"; then @@ -77,13 +82,14 @@ EOF %build +# --with-event-pthreads cause test failure + cd %{pecl_name}-%{version} %{_bindir}/phpize %configure \ --with-event-core \ --with-event-extra \ --with-event-openssl \ - --with-event-pthreads \ --with-php-config=%{_bindir}/php-config make %{?_smp_mflags} @@ -93,7 +99,6 @@ cd ../%{pecl_name}-zts --with-event-core \ --with-event-extra \ --with-event-openssl \ - --with-event-pthreads \ --with-php-config=%{_bindir}/zts-php-config make %{?_smp_mflags} @@ -120,10 +125,12 @@ if [ -f %{php_extdir}/sockets.so ]; then OPTS="-d extension=sockets.so" fi +# https://bugs.php.net/64680 +SKIP_ONLINE_TESTS=1 \ TEST_PHP_EXECUTABLE=%{_bindir}/php \ TEST_PHP_ARGS="-n -d extension_dir=$PWD/modules $OPTS -d extension=%{pecl_name}.so" \ NO_INTERACTION=1 \ -REPORT_EXIT_STATUS=0 \ +REPORT_EXIT_STATUS=1 \ %{_bindir}/php -n run-tests.php cd ../%{pecl_name}-zts @@ -132,10 +139,11 @@ if [ -f %{php_ztsextdir}/sockets.so ]; then OPTS="-d extension=sockets.so" fi +SKIP_ONLINE_TESTS=1 \ TEST_PHP_EXECUTABLE=%{__ztsphp} \ TEST_PHP_ARGS="-n -d extension_dir=$PWD/modules $OPTS -d extension=%{pecl_name}.so" \ NO_INTERACTION=1 \ -REPORT_EXIT_STATUS=0 \ +REPORT_EXIT_STATUS=1 \ %{__ztsphp} -n run-tests.php |