[SCM] Samba Shared Repository - branch master updated

Jelmer Vernooij jelmer at vernstok.nl
Fri May 28 07:13:56 MDT 2010


Hi Matthias,

On Fri, 2010-05-28 at 03:25 -0500, Matthias Dieter Wallnöfer wrote:
> diff --git a/source4/web_server/wsgi.c b/source4/web_server/wsgi.c
> index 7ee70e1..7a23ae4 100644
> --- a/source4/web_server/wsgi.c
> +++ b/source4/web_server/wsgi.c
> @@ -300,7 +300,9 @@ static PyObject *create_environ(bool tls, int content_length, struct http_header
>  		if (!strcasecmp(hdr->name, "Content-Type")) {
>  			PyDict_SetItemString(env, "CONTENT_TYPE", PyString_FromString(hdr->value));
>  		} else { 
> -			asprintf(&name, "HTTP_%s", hdr->name);
> +			if (asprintf(&name, "HTTP_%s", hdr->name) < 0) {
> +				continue;
> +			}
>  			PyDict_SetItemString(env, name, PyString_FromString(hdr->value));
>  			free(name);
>  		}
^^^ Please don't ignore allocation problems, instead raise an exception
as I indicated in my review of your code in bugzilla.

Cheers,

Jelmer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.samba.org/pipermail/samba-cvs/attachments/20100528/6a8949b8/attachment-0001.pgp>


More information about the samba-cvs mailing list