mirror of
https://github.com/eclipse-threadx/threadx.git
synced 2026-10-06 06:59:08 +08:00
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 <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
co-authored by
Copilot
parent
92ce0754ed
commit
190c4d6be4
@@ -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 */
|
||||
/* */
|
||||
|
||||
Reference in New Issue
Block a user