[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: wget2 | Draft: Small fixes (!505)
From: |
@rockdaboot |
Subject: |
Re: wget2 | Draft: Small fixes (!505) |
Date: |
Sat, 28 May 2022 17:24:35 +0000 |
Tim Rühsen started a new discussion on libwget/http_parse.c:
https://gitlab.com/gnuwget/wget2/-/merge_requests/505#note_963272695
> int day, mon = 0, year, hour, min, sec, leap_month, leap_year, days;
> char mname[4] = "";
>
> - if (sscanf(s, " %*[a-zA-Z], %02d %3s %4d %2d:%2d:%2d", &day, mname,
> &year, &hour, &min, &sec) >= 6) {
> + if (sscanf(s, " %*3[a-zA-Z], %2d %3s %4d %2d:%2d:%2d", &day, mname,
> &year, &hour, &min, &sec) == 6) {
We don't want to lint the web and try to be as lenient as possible, because
there are so many broken servers out there. So please do not limit this to 3
chars (also no limit please in the other scanf fmt strings you changed).
I am fine with `==` instead of `>=` and also `%2d` instead of `%02d` is fine.
--
Reply to this email directly or view it on GitLab:
https://gitlab.com/gnuwget/wget2/-/merge_requests/505#note_963272695
You're receiving this email because of your account on gitlab.com.
- Re: wget2 | Draft: Small fixes (!505), @rockdaboot, 2022/05/28
- Re: wget2 | Draft: Small fixes (!505), @rockdaboot, 2022/05/28
- Re: wget2 | Draft: Small fixes (!505), @rockdaboot, 2022/05/28
- Re: wget2 | Draft: Small fixes (!505),
@rockdaboot <=
- Re: wget2 | Draft: Small fixes (!505), @rockdaboot, 2022/05/28
- Re: wget2 | Draft: Small fixes (!505), @rockdaboot, 2022/05/28
- Re: wget2 | Draft: Small fixes (!505), @rockdaboot, 2022/05/28
- Re: wget2 | Draft: Small fixes (!505), @rockdaboot, 2022/05/28
- Re: wget2 | Draft: Small fixes (!505), @rockdaboot, 2022/05/28
- Re: wget2 | Draft: Small fixes (!505), @rockdaboot, 2022/05/29
- Re: wget2 | Draft: Small fixes (!505), @rockdaboot, 2022/05/29
- Re: wget2 | Draft: Small fixes (!505), @rockdaboot, 2022/05/29
- Re: wget2 | Draft: Small fixes (!505), @rockdaboot, 2022/05/29
- Re: wget2 | Draft: Small fixes (!505), @rockdaboot, 2022/05/29