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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: hsheo at postech dot ac dot kr
New email:
PHP Version: OS:

 

 [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: Thu May 02 15:01:33 2024 UTC