bug-wget
[Top][All Lists]
Advanced

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

Re: [Bug-wget] one strlen on loop


From: Rodgger Bruno
Subject: Re: [Bug-wget] one strlen on loop
Date: Tue, 24 Oct 2017 20:10:28 -0300

right?

2017-10-23 4:58 GMT-03:00 Tim Rühsen <address@hidden>:

> 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
>
>

Attachment: 0001-add-tok_len-to-strlen.-strlen-only-once.patch
Description: Text Data


reply via email to

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