php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2788 urldecode bug
Submitted: 1999-11-21 17:31 UTC Modified: 1999-11-21 21:11 UTC
From: hsheo at postech dot ac dot kr Assigned:
Status: Closed Package: Other
PHP Version: 3.0.12 OS: RedHat 6.0
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
8 + 2 = ?
Subscribe to this entry?

 
 [1999-11-21 17:31 UTC] hsheo at postech dot ac dot kr
--- php-4.0b3/ext/standard/url.c.orig   Sun Nov 21 23:30:07 1999
+++ php-4.0b3/ext/standard/url.c        Sun Nov 21 23:38:59 1999
@@ -297,9 +297,14 @@
                var_reset(return_value);
                return;
        }
-       len = _php3_urldecode((*arg)->value.str.val, (*arg)->value.str.len);
 
-       RETVAL_STRINGL((*arg)->value.str.val, len, 1);
+       { char *str; /* Heo Hee-Seok: Bug fix */
+       str = (char *) emalloc((*arg)->value.str.len + 1);
+       strncpy(str, (*arg)->value.str.val, (*arg)->value.str.len + 1);
+       len = _php3_urldecode(str, (*arg)->value.str.len);
+
+       RETVAL_STRINGL(str, len, 1);
+       efree(str); }
 }
 /* }}} */
 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-11-21 21:11 UTC] sas at cvs dot php dot net
Thanks for the patch. I've fixed it in a slightly different way.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 17 10:01:32 2024 UTC