wget-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: wget2 | Draft: Small fixes (!505)


From: Avinash Sonawane (@rootkea)
Subject: Re: wget2 | Draft: Small fixes (!505)
Date: Sat, 25 Jun 2022 17:43:47 +0000



Avinash Sonawane commented on a discussion on examples/getstream.c: 
https://gitlab.com/gnuwget/wget2/-/merge_requests/505#note_1005441475

>       // If you are looking for header that are ignored by libwget, parse 
> them yourself.
>  
>       if (resp->header) {
> -             char key[64], value[128];
> +             char key[64], value[128] = "";

`sscanf() >= 1` check says the code will work even for empty values (despite 
the accompanying comment saying otherwise).

If we indeed want to exclude the case of empty values then the check should be 
`sscanf() == 2`.

-- 
Reply to this email directly or view it on GitLab: 
https://gitlab.com/gnuwget/wget2/-/merge_requests/505#note_1005441475
You're receiving this email because of your account on gitlab.com.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]