[PHP-BUG] Bug #65227 [NEW]: Memory leak in gmp_cmp second parameter

2013-07-09 Thread frozenf...@php.net
From: frozenf...@php.net
Operating system: Irrelevant
PHP version:  master-Git-2013-07-09 (Git)
Package:  GNU MP related
Bug Type: Bug
Bug description:Memory leak in gmp_cmp second parameter

Description:

Reporting this bug for a third party 
(http://www.reddit.com/r/PHP/comments/1hx7qz/what_is_going_on_here_how_do_i_fix_t
his_memory/), and related to a user note 
(http://www.php.net/manual/en/function.gmp-cmp.php#99120).

The gmp_cmp function leaks memory when a string is used as the value of the

second parameter.

My guess is that it relates to the way that the type is juggled in the
gmp_cmp 
function (https://github.com/php/php-src/blob/master/ext/gmp/gmp.c#L848),
where 
it checks the type of the second parameter to see if it's a long. It
doesn't 
however check if the second parameter is a string, or really any other
type.



Test script:
---
Third party's example code can be found at
http://www.reddit.com/r/PHP/comments/1hx7qz/what_is_going_on_here_how_do_i_fix_this_memory/


-- 
Edit bug report at https://bugs.php.net/bug.php?id=65227&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=65227&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=65227&r=trysnapshot53
Try a snapshot (trunk): 
https://bugs.php.net/fix.php?id=65227&r=trysnapshottrunk
Fixed in SVN:   https://bugs.php.net/fix.php?id=65227&r=fixed
Fixed in release:   https://bugs.php.net/fix.php?id=65227&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=65227&r=needtrace
Need Reproduce Script:  https://bugs.php.net/fix.php?id=65227&r=needscript
Try newer version:  https://bugs.php.net/fix.php?id=65227&r=oldversion
Not developer issue:https://bugs.php.net/fix.php?id=65227&r=support
Expected behavior:  https://bugs.php.net/fix.php?id=65227&r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=65227&r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=65227&r=submittedtwice
register_globals:   https://bugs.php.net/fix.php?id=65227&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65227&r=php4
Daylight Savings:   https://bugs.php.net/fix.php?id=65227&r=dst
IIS Stability:  https://bugs.php.net/fix.php?id=65227&r=isapi
Install GNU Sed:https://bugs.php.net/fix.php?id=65227&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=65227&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=65227&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=65227&r=mysqlcfg



[PHP-BUG] Bug #53248 [NEW]: rawurlencode RFC 3986 EBCDIC support

2010-11-06 Thread frozenf...@php.net
From: frozenfire
Operating system: Irrelevant
PHP version:  trunk-SVN-2010-11-07 (SVN)
Package:  *URL Functions
Bug Type: Bug
Bug description:rawurlencode RFC 3986 EBCDIC support

Description:

When rawurlencode was updated to conform
(http://svn.php.net/viewvc?view=revision&revision=260750) to RFC 3986
(http://www.ietf.org/rfc/rfc3986.txt), the EBCDIC version of the code was
not brought into line.



Attached is a patch that simply adds the tilde character to the list of
exempt characters in the function, as per RFC 3986.


-- 
Edit bug report at http://bugs.php.net/bug.php?id=53248&edit=1
-- 
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=53248&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=53248&r=trysnapshot53
Try a snapshot (trunk):  
http://bugs.php.net/fix.php?id=53248&r=trysnapshottrunk
Fixed in SVN:
http://bugs.php.net/fix.php?id=53248&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=53248&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=53248&r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=53248&r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=53248&r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=53248&r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=53248&r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=53248&r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=53248&r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=53248&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=53248&r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=53248&r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=53248&r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=53248&r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=53248&r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=53248&r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=53248&r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=53248&r=mysqlcfg