[LTP] [PATCH 0/2] Add handling of abnormal input for parse_opts()

Zhao Gongyi zhaogongyi@huawei.com
Wed Nov 30 03:18:59 CET 2022


1. Add SAFE_STRTOF
2. Replace atoi/atof with SAFE_STRTOL/SAFE_STRTOF to deal with abnormal
   input for parse_opts()

Zhao Gongyi (2):
  lib/safe_macros: Add SAFE_STRTOF
  lib: Replace atoi/atof with SAFE_STRTOL/SAFE_STRTOF

 include/safe_macros_fn.h  |  3 +++
 include/tst_safe_macros.h |  3 +++
 lib/safe_macros.c         | 26 ++++++++++++++++++++++++++
 lib/tst_test.c            |  8 +++-----
 4 files changed, 35 insertions(+), 5 deletions(-)

--
2.17.1



More information about the ltp mailing list