[libc-commits] [PATCH] D106885: [libc] Fix strtok_r crash when src and *saveptr are both nullptr
Alf via Phabricator via libc-commits
libc-commits at lists.llvm.org
Tue Jul 27 11:16:38 PDT 2021
gAlfonso-bit accepted this revision.
gAlfonso-bit added inline comments.
================
Comment at: libc/test/src/string/strtok_r_test.cpp:89
+ // returned
+ ASSERT_STREQ(__llvm_libc::strtok_r(src, ",", &reserve), nullptr);
+ // And that reserve isn't changed when that happens
----------------
sivachandra wrote:
> May be add:
>
> ```
> ASSERT_STREQ(reserver, nullptr);
> ```
>
> May be that is what your intention was below, but not sure.
Yeah that is what I meant. Thank you!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106885/new/
https://reviews.llvm.org/D106885
More information about the libc-commits
mailing list