[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-wget] one strlen on loop
From: |
Tim Rühsen |
Subject: |
Re: [Bug-wget] one strlen on loop |
Date: |
Mon, 23 Oct 2017 09:58:28 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
Hi Rodgger,
thanks for your contribution !
Could you please amend a few things !?
Not compilable here:
> if (tok_len < 12) && (strchr( tok, '-') != NULL))
If you are about to touch the code, please also add a space where it is
missing (between tok and +):
> *(tok+ (tok_len - 4)) = '\0'; /* Discard ".DIR". */
And there seems to be two buffer underflow issues in the old code.
Please consider fixing it as well:
> if (!c_strncasecmp((tok + (tok_len - 4)), ".DIR", 4))
> else if (!c_strncasecmp ((tok + (tok_len - 6)), ".DIR;1", 6))
Should be like
> if ((tok_len >= 4) && !c_strncasecmp((tok + (tok_len - 4)),
".DIR", 4))
> else if ((tok_len >= 6) && !c_strncasecmp ((tok + (tok_len - 6)),
".DIR;1", 6))
Please amend the commit message to GNU style (One brief descriptive
line, empty line, listing all file/function + a more detailed
description). The sign-off is ok, but not needed.
With Best Regards, Tim
signature.asc
Description: OpenPGP digital signature