diff options
author | David Malcolm <dmalcolm@redhat.com> | 2023-08-24 10:24:40 -0400 |
---|---|---|
committer | David Malcolm <dmalcolm@redhat.com> | 2023-08-24 10:24:40 -0400 |
commit | bbdc0e0d0042ae16aa4d09ceb52c71e746d9139d (patch) | |
tree | b76244adc66be5454e78f1a4d4740d7b1ad7615c /gcc/gcc.cc | |
parent | 2bad0eeb5573e52c4b7b51546ecffcb17f46eda3 (diff) | |
download | gcc-bbdc0e0d0042ae16aa4d09ceb52c71e746d9139d.zip gcc-bbdc0e0d0042ae16aa4d09ceb52c71e746d9139d.tar.gz gcc-bbdc0e0d0042ae16aa4d09ceb52c71e746d9139d.tar.bz2 |
analyzer: implement kf_strcat [PR105899]
gcc/analyzer/ChangeLog:
PR analyzer/105899
* call-details.cc
(call_details::check_for_null_terminated_string_arg): Split into
overloads, one taking just an arg_idx, the other a new
"include_terminator" param.
* call-details.h: Likewise.
* kf.cc (class kf_strcat): New.
(kf_strcpy::impl_call_pre): Update for change to
check_for_null_terminated_string_arg.
(register_known_functions): Register kf_strcat.
* region-model.cc
(region_model::check_for_null_terminated_string_arg): Split into
overloads, one taking just an arg_idx, the other a new
"include_terminator" param. When returning an svalue, handle
"include_terminator" being false by subtracting one.
* region-model.h
(region_model::check_for_null_terminated_string_arg): Split into
overloads, one taking just an arg_idx, the other a new
"include_terminator" param.
gcc/ChangeLog:
PR analyzer/105899
* doc/invoke.texi (Static Analyzer Options): Add "strcat" to the
list of functions known to the analyzer.
gcc/testsuite/ChangeLog:
PR analyzer/105899
* gcc.dg/analyzer/strcat-1.c: New test.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
Diffstat (limited to 'gcc/gcc.cc')
0 files changed, 0 insertions, 0 deletions