mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:51:53 +03:00
Also enable `bugprone-suspicious-realloc-usage` clang-tidy option
to verify.
Fixing:
```
tests/server/rtspd.c:328:37: error: 'req->rtp_buffer' may be set to null if 'realloc' fails,
which may result in a leak of the original buffer
[bugprone-suspicious-realloc-usage,-warnings-as-errors]
328 | req->rtp_buffer = realloc(req->rtp_buffer,
| ~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~
```
Ref: https://clang.llvm.org/extra/clang-tidy/checks/bugprone/suspicious-realloc-usage.html
Closes #20621
17 lines
654 B
YAML
17 lines
654 B
YAML
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
|
#
|
|
# SPDX-License-Identifier: curl
|
|
---
|
|
# https://clang.llvm.org/extra/clang-tidy/checks/list.html
|
|
|
|
# -clang-analyzer-security.insecureAPI.bzero: for FD_ZERO() (seen on macOS)
|
|
# -clang-analyzer-security.ArrayBound: due to false positives with clang-tidy v21.1.0
|
|
Checks: >-
|
|
-clang-analyzer-security.insecureAPI.bzero,
|
|
-clang-analyzer-optin.performance.Padding,
|
|
-clang-analyzer-security.ArrayBound,
|
|
-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,
|
|
-clang-diagnostic-nullability-extension,
|
|
bugprone-suspicious-realloc-usage,
|
|
misc-const-correctness,
|
|
portability-*
|