cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl 0xCD uninitialized data

From: Michael Wood <esiotrot_at_gmail.com>
Date: Thu, 31 Jul 2008 12:08:22 +0200

Hi

On Thu, Jul 31, 2008 at 11:52 AM, Ger <ger.lawlor_at_gmail.com> wrote:
> I am new to libcurl development.....
>
> Over the wire I get 0xCD byte pattern between /pdp/PdpEndPoint and
> HTTP/1.1 below......any ideas why this might occur? This would
> normally indicate uninitialized memory, so maybe I am missing a
> libcurl call in my code.
>
> POST /pxp/pxpEndPoint HTTP/1.1
> Authorization: Basic c3VwZXJ12cvfJRWUZZ3A5Rp1jkp22pVVaaanZfb1E9PQ==
> Host: localhost:9090
> Accept: */*
> userName: testuser
> password: uYgp9FZIEnREq6iEZjvEnQ==
> content-type: text/xml; charset=ISO-8859-1
> methodName: getStatus
> User-Agent: Jakarta Commons-HttpClient/2.0final
> Content-Length: 908

Your Authorization and password headers also seem to contain corrupted
data that is then successfully base64 encoded:

Python 2.5.1 (r251:54863, Jan 17 2008, 19:35:17)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> "c3VwZXJ12cvfJRWUZZ3A5Rp1jkp22pVVaaanZfb1E9PQ==".decode("base64")
'superu\xd9\xcb\xdf%\x15\x94e\x9d\xc0\xe5\x1au\x8eJv\xda\x95Ui\xa6\xa7e\xf6\xf5\x13\xd3\xd0'
>>> "uYgp9FZIEnREq6iEZjvEnQ==".decode("base64")
'\xb9\x88)\xf4VH\x12tD\xab\xa8\x84f;\xc4\x9d'

Of course, since I don't know the format of the password field, that
might be correct, but the other one is definitely wrong for Auth
Basic. It should be in the form:

user:password

when base64 decoded.

-- 
Michael Wood <esiotrot_at_gmail.com>
Received on 2008-07-31