mirror of
https://github.com/moparisthebest/curl
synced 2025-02-28 09:21:50 -05:00
Curl_urldecode: don't allow NULL as receiver
For a function that returns a decoded version of a string, it seems really strange to allow a NULL pointer to get passed in which then prevents the decoded data from being returned! This functionality was not documented anywhere either. If anyone would use it that way, that memory would've been leaked. Bug: https://github.com/bagder/curl/pull/90 Reported-by: Arvid Norberg
This commit is contained in:
parent
db981b7b30
commit
d3d871cb4f
@ -5,7 +5,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
@ -196,7 +196,6 @@ CURLcode Curl_urldecode(struct SessionHandle *data,
|
||||
/* store output size */
|
||||
*olen = strindex;
|
||||
|
||||
if(ostring)
|
||||
/* store output string */
|
||||
*ostring = ns;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user