php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58483 [PATCH] HttpMessage::setHttpVersion segfault
Submitted: 2009-01-03 16:14 UTC Modified: 2009-01-12 04:43 UTC
From: felipe@php.net Assigned: mike (profile)
Status: Closed Package: pecl_http (PECL)
PHP Version: 5_3 CVS-2009-01-03 (dev) OS:
Private report: No CVE-ID: None
 [2009-01-03 16:14 UTC] felipe@php.net
Description:
------------
Hi Mike, the segfault is obvious seeing the code.

Here is a simple patch:
http://felipe.ath.cx/diff/http-bug.diff


Reproduce code:
---------------
$ sapi/cli/php -r '$x = new httpmessage; $x->sethttpversion(PHP_INT_MAX);'



Expected result:
----------------
Warning: HttpMessage::setHttpVersion(): Invalid HTTP protocol version (1.0 or 1.1): 2.1E+9 in Command line code on line 1


Actual result:
--------------
Warning: HttpMessage::setHttpVersion(): Invalid HTTP protocol version (1.0 or 1.1): 2147483647.0 in Command line code on line 1
Falha de segmenta??o


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-01-12 04:43 UTC] mike@php.net
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 21:01:36 2024 UTC