]> git.ipfire.org Git - thirdparty/gcc.git/commit
analyzer: show size in SARIF property bag for -Wanalyzer-tainted-allocation-size
authorDavid Malcolm <dmalcolm@redhat.com>
Wed, 10 Apr 2024 20:43:28 +0000 (16:43 -0400)
committerDavid Malcolm <dmalcolm@redhat.com>
Wed, 10 Apr 2024 20:43:28 +0000 (16:43 -0400)
commit115d5c6b009456e7e817dc5f1aeaea8d38929c93
treeddf9537cc432484d52230c202dd5067129f7fff3
parent7f6599a201be2a3f7d1d799087e4ba283ec0bee8
analyzer: show size in SARIF property bag for -Wanalyzer-tainted-allocation-size

gcc/analyzer/ChangeLog:
* sm-taint.cc (tainted_allocation_size::tainted_allocation_size):
Add "size_in_bytes" param.
(tainted_allocation_size::maybe_add_sarif_properties): New.
(tainted_allocation_size::m_size_in_bytes): New field.
(region_model::check_dynamic_size_for_taint): Pass size_in_bytes
to tainted_allocation_size ctor.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
gcc/analyzer/sm-taint.cc