Repository navigation
fix/security build warnings - #423
Merged
Ekansh Gupta (ekanshibu) merged 2 commits intoNov 25, 2026
Merged
Ekansh Gupta (ekanshibu) merged 2 commits into
Ekansh Gupta (ekanshibu) merged 2 commits into
Conversation
Building with -D_FORTIFY_SOURCE=2 triggers -Wformat-truncation warnings for most of the snprintf() calls that build paths from directory entry names, YAML values and sysfs contents. When such a path doesn't fit, the truncated result names a different file or directory, which the tool would then stat, open or parse. Make join2() report truncation and use it for all "%s/%s" path construction, skipping the entry (or failing the lookup) when the path doesn't fit. Likewise, check the result of building the remoteproc firmware path, and don't record a remoteproc whose name doesn't fit in dsp_t.rproc rather than keeping a truncated name. Signed-off-by: Loïc Minier <[email protected]>
get_domain_from_name() stored the result of strstr() on a const URI in a non-const pointer, dropping the qualifier (-Wdiscarded-qualifiers). Declare session_uri as const char *; it is only read. is_smmu_enabled() was a non-static inline function calling the static hlist_lookup(), which C99 does not allow. It also dereferenced the result of hlist_lookup() without checking for NULL. It has no callers and, being an inline definition without an extern declaration, was never exported from the libraries, so remove it. Signed-off-by: Loïc Minier <[email protected]>
Ekansh Gupta (ekanshibu)
approved these changes
Nov 17, 2026
Mahima Bhattaram (m-bhattar)
approved these changes
Nov 18, 2026
Contributor
🤖 FastRPC AI Code Review —
|
| Severity | Location | Rule | Issue | Suggested Fix |
|---|---|---|---|---|
| 🟡 MEDIUM | src/fastrpc_apps_user.c:1061 |
fn-001 |
Removed inline function is_smmu_enabled() without checking if it's used elsewhere | Verify the function is not called anywhere in the codebase before removal, or if it's defined elsewhere, ensure no duplicate definition error |
| 🔴 HIGH | test/fastrpc_healthcheck.c:713 |
err-001 |
snprintf return value checked but no error handling when truncation occurs | Add error handling: if (n < 0 |
To suppress a false positive: add an entry to
.qvigor/review_feedback.jsonon thedevelopmentbranch with"decision": "denied".
Vinayak Katoch (quic-vkatoch)
approved these changes
Nov 18, 2026
quic-parihar
approved these changes
Nov 18, 2026
Chenna Kesava Raju (Chennak-quic)
approved these changes
Nov 24, 2026
Contributor
|
Pre-merge CI results — patch Validated On
Kernel: Test Matrix
LAVA Jobs:
|
Ekansh Gupta (ekanshibu)
merged commit Nov 25, 2026
5c0a10d
into
qualcomm:development
22 of 24 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A couple of issues discovered through Debian build warnings: