diff options
| author | Frédéric Desbiens <[email protected]> | 2026-07-27 10:30:49 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-07-27 10:30:49 -0400 |
| commit | 190c4d6be48ae2fcf555d282691f6dfd985323ee (patch) | |
| tree | e98463eae237e056ff5143b4c4ec1feb8571a740 /common_modules/module_manager | |
| parent | 92ce0754ed42f9d9d1121805057db5cc9c171d66 (diff) | |
Flagged txm_module_object_pointer_get as deprecated (#562)
Added #pragma message compile-time warning to the module library
source and updated the DESCRIPTION blocks in both the library and
manager implementations.
Reason: this wrapper passes UINT_MAX as the name-buffer length to
the underlying extended search. The comparison loop can therefore
read past the end of a short name buffer, which is undefined
behaviour. Callers should use txm_module_object_pointer_get_extended()
and supply the actual buffer length.
Co-authored-by: Copilot <[email protected]>
Diffstat (limited to 'common_modules/module_manager')
| -rw-r--r-- | common_modules/module_manager/src/txm_module_manager_object_pointer_get.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/common_modules/module_manager/src/txm_module_manager_object_pointer_get.c b/common_modules/module_manager/src/txm_module_manager_object_pointer_get.c index 84cf6c96..8b24558b 100644 --- a/common_modules/module_manager/src/txm_module_manager_object_pointer_get.c +++ b/common_modules/module_manager/src/txm_module_manager_object_pointer_get.c @@ -37,9 +37,10 @@ /* */ /* DESCRIPTION */ /* */ -/* This function is deprecated and calls the secure version of this */ -/* function (_txm_module_manager_object_pointer_get_extended) with the */ -/* maximum possible name length since none was passed. */ +/* DEPRECATED. Use _txm_module_manager_object_pointer_get_extended() */ +/* instead, passing the actual name-buffer length. This wrapper */ +/* passes UINT_MAX as the length, which can cause the name-comparison */ +/* loop to read past the end of a short buffer (undefined behaviour). */ /* */ /* INPUT */ /* */ |
