[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen(), size() or equal length

Csaba Dabis via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 13 05:05:26 PDT 2019


Charusso added a comment.

I think everything is working fine on the build-bot side. One tiny issue on Windows left where the `getLength()` could not obtain the length properly: rL374713 <https://reviews.llvm.org/rL374713>, I will look into that.

In D45050#1071898 <https://reviews.llvm.org/D45050#1071898>, @xbolva00 wrote:

> Shouldn't it catch in curl also this code?
>
> urllen = strlen(url_clone);
>
>   ....
>
> memcpy(newest, url_clone, urllen);
>
> Edit: if possible, report these bugs to project developers :)


@xbolva00, now I answer it: it is out of the scope of the Tidy, sadly. I really wanted to make this work with tons of heuristics, which made that patch so enormous. I have not forgotten it, I will report the found issues some months later. Now I want to do the same patch with the help of the Analyzer, and research that, whether this type of matching is could be done more appropriately. I have already started that idea by D68725 <https://reviews.llvm.org/D68725>. Thanks again!

Thanks @JonasToth, you really wanted to see my first patch upstreamed, and also thanks everyone, your support really helped me to understand how to do reviews and how to Clang. I apologize for the size, I felt that the larger the better.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D45050/new/

https://reviews.llvm.org/D45050





More information about the cfe-commits mailing list