cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: http digest input parse fix

From: Joel Chen <jchen_at_interval.com>
Date: Tue, 3 Aug 2004 10:54:33 -0700

I don't know HTML enough to be sure of the syntax restriction, but a
case that won't work is "value=content ," Your solution was what I used
when I first encounter the bug actually. As it turns out, which I just
verified, %n would require a search for the comma also if aforementioned
syntax is valid. I am generally more nervous about hard coding values
in string parsers myself. The function scanf varies a lot on different
platforms. %n should be the easiest to implement, if they can't even
get that right, I'd be nervous about other ones as well. Anyway, it
seems digest is rarely use by anyone now and the fix submitted in CVS
serves my purpose so I won't have to patch the file when I get the next
release. :)

-----Original Message-----
From: curl-users-bounces_at_cool.haxx.se
[mailto:curl-users-bounces_at_cool.haxx.se] On Behalf Of Daniel Stenberg
Sent: Tuesday, August 03, 2004 12:14 AM
To: curl tool talk
Subject: RE: http digest input parse fix

On Mon, 2 Aug 2004, Joel Chen wrote:

> That's quite right. I've failed to consider such case. So there may
be
> other cases. A more sure method is to let scanf tell us where the
next
> value pair starts using %n.

Actually, it isn't more "sure" since my method works fine. I don't
normally
use %n with scanf() since there are known platforms/environments with
broken
implementations of that.

-- 
      Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
       Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-08-03