[libc-commits] [PATCH] D112176: [libc] fix strtol returning the wrong length

Michael Jones via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Oct 20 13:14:31 PDT 2021


michaelrj created this revision.
michaelrj added a reviewer: sivachandra.
Herald added subscribers: libc-commits, ecnelises, tschuett.
Herald added a project: libc-project.
michaelrj requested review of this revision.

Previously, strtol/ll/ul/ull would return a pointer to the end of its
parsing, regardless of if it detected a number. Now it will return a
length of 0 when it doesn't find a number.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D112176

Files:
  libc/src/__support/str_conv_utils.h
  libc/test/src/stdlib/strtol_test.cpp
  libc/test/src/stdlib/strtoll_test.cpp
  libc/test/src/stdlib/strtoul_test.cpp
  libc/test/src/stdlib/strtoull_test.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112176.381079.patch
Type: text/x-patch
Size: 5578 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20211020/504fe3f6/attachment.bin>


More information about the libc-commits mailing list