[LIBC] Modfied Version of sscanf

Robert Schulze rs at bytecamp.net
Mon May 2 14:15:24 UTC 2011


Hi,

Am 02.05.2011 16:06, schrieb Artem Belevich:
>
> Second problem -- res on success will always be "" as you've just did *ptr=0.

thats right, the copy should look like:

res=strdup(str+4);

 > Bzzt!
 >
 > Try it on "GET blah_HTTP/1.1.1.1.1.1_whatever HTTP/1.1"

will return "blah_HTTP/1.1.1.1.1.1_whatever" as resource.
It should be the next step to check whether <resource> is valid.

with kind regards,
Robert Schulze


More information about the freebsd-hackers mailing list