Null-terminate the string in percent_decode() so that we don't depend on
malloc() returning zeroed storage or dump core while starting up. Found-by: /etc/malloc.conf ->AJ
This commit is contained in:
parent
59e8efa110
commit
6525961b64
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=22202
@ -26,7 +26,7 @@
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id$
|
||||
* $Id: util.c,v 1.1 1997/01/30 21:43:44 wollman Exp $
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -148,6 +148,7 @@ percent_decode(const char *uri)
|
||||
*s++ = *uri++;
|
||||
}
|
||||
}
|
||||
*s = '\0';
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user