[Debian-iot-maintainers] Bug#1001384: ulfius: Fix ulfius_url_{encode, decode} call malloc instad of o_malloc in stable
Nicolas Mora
babelouest at debian.org
Thu Dec 9 12:42:15 GMT 2021
Source: ulfius
Version: 2.7.1-1+deb11u1
Severity: important
Tags: patch
-- System Information:
Debian Release: 11.1
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500,
'proposed-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 5.10.0-9-amd64 (SMP w/4 CPU threads)
Locale: LANG=fr_CA.UTF-8, LC_CTYPE=fr_CA.UTF-8 (charmap=UTF-8), LANGUAGE not
set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
-------------- next part --------------
Description: call malloc instead of o_malloc
Author: Harald Welte <laforge at gnumonks.org>
Forwarded: not-needed
--- a/src/u_request.c
+++ b/src/u_request.c
@@ -143,7 +143,7 @@
*/
static char * url_decode(const char * str) {
if (str != NULL) {
- char * pstr = (char*)str, * buf = malloc(strlen(str) + 1), * pbuf = buf;
+ char * pstr = (char*)str, * buf = o_malloc(strlen(str) + 1), * pbuf = buf;
while (* pstr) {
if (* pstr == '%') {
if (pstr[1] && pstr[2]) {
--- a/src/ulfius.c
+++ b/src/ulfius.c
@@ -1796,7 +1796,7 @@
char * ulfius_url_encode(const char * str) {
char * pstr = (char*)str, * buf = NULL, * pbuf = NULL;
if (str != NULL) {
- buf = malloc(strlen(str) * 3 + 1);
+ buf = o_malloc(strlen(str) * 3 + 1);
if (buf != NULL) {
pbuf = buf;
while (* pstr) {
@@ -1830,7 +1830,7 @@
char * ulfius_url_decode(const char * str) {
char * pstr = (char*)str, * buf = NULL, * pbuf = NULL;
if (str != NULL) {
- buf = malloc(strlen(str) + 1);
+ buf = o_malloc(strlen(str) + 1);
if (buf != NULL) {
pbuf = buf;
while (* pstr) {
More information about the Debian-iot-maintainers
mailing list