[libc-commits] [PATCH] D84611: [libc] Adds fuzz test for strstr and alphabetizes string fuzz CMakeList.

Chris Gyurgyik via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Jul 29 12:50:29 PDT 2020


cgyurgyik marked 3 inline comments as done.
cgyurgyik added inline comments.


================
Comment at: libc/fuzzing/string/strstr_fuzz.cpp:64
+
+  for (size_t j = 0; j < size2; ++j)
+    data2[j] = data[i++];
----------------
sivachandra wrote:
> `data1` should be copied so that we can add the null terminator. But, why should we copy into `data2`? Can we not use the input directly?
We can, I mostly did it to show there is no intersection between the two. Fixed so that only one new container is created.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84611



More information about the libc-commits mailing list