diff --git a/rtos-docs/filex/modules/ROOT/pages/chapter4.adoc b/rtos-docs/filex/modules/ROOT/pages/chapter4.adoc index 38b987b..fc9580c 100644 --- a/rtos-docs/filex/modules/ROOT/pages/chapter4.adoc +++ b/rtos-docs/filex/modules/ROOT/pages/chapter4.adoc @@ -896,6 +896,8 @@ character "\", use the construct "\\".*/ Gets the long name of a directory from its short name. +WARNING: *_This service is deprecated. Do not use it in new code._* Use <> instead, passing the actual size of the `long_name` buffer. This function writes up to `FX_MAX_LONG_NAME_LEN` characters regardless of the caller's buffer size, which can cause a buffer overrun. + === Prototype [,c] @@ -1290,6 +1292,8 @@ status = fx_directory_rename(&my_media, "abc", "def"); Gets the specified directory's short name from its long name. +WARNING: *_This service is deprecated. Do not use it in new code._* Use <> instead, passing the actual size of the `short_name` buffer. This function writes up to `FX_MAX_SHORT_NAME_LEN` characters regardless of the caller's buffer size, which can cause a buffer overrun. + === Prototype [,c] @@ -3661,6 +3665,8 @@ status = fx_media_space_available(&my_media, &available_bytes); Gets the media's volume name. +WARNING: *_This service is deprecated. Do not use it in new code._* Use <> instead, passing the actual size of the `volume_name` buffer. This function writes up to 12 characters regardless of the caller's buffer size, which can cause a buffer overrun. + === Prototype [,c] @@ -4440,6 +4446,8 @@ status = fx_unicode_file_rename(&my_media, my_old_unicode_name, Gets the length of a Unicode name. +WARNING: *_This service is deprecated. Do not use it in new code._* Use <> instead, passing the actual buffer size. This function scans up to 256 bytes regardless of the actual buffer size, which can cause an overread. + === Prototype [,c] @@ -4545,6 +4553,8 @@ length = fx_unicode_length_get_extended(my_unicode_name, sizeof(my_unicode_name) Gets the Unicode name from a short name. +WARNING: *_This service is deprecated. Do not use it in new code._* Use <> instead, passing the actual size of the `destination_unicode_name` buffer. This function writes up to `FX_MAX_LONG_NAME_LEN*2` bytes regardless of the caller's buffer size, which can cause a buffer overrun. + === Prototype [,c] @@ -4679,6 +4689,8 @@ length = fx_unicode_name_get_extended(&ram_disk, "ABC0~111.TXT", Gets the short name from a Unicode name. +WARNING: *_This service is deprecated. Do not use it in new code._* Use <> instead, passing the actual size of the `destination_short_name` buffer. This function writes up to 13 bytes regardless of the caller's buffer size, which can cause a buffer overrun. + === Prototype [,c] diff --git a/rtos-docs/guix/modules/ROOT/pages/chapter-3.adoc b/rtos-docs/guix/modules/ROOT/pages/chapter-3.adoc index 9cd960b..685c0af 100644 --- a/rtos-docs/guix/modules/ROOT/pages/chapter-3.adoc +++ b/rtos-docs/guix/modules/ROOT/pages/chapter-3.adoc @@ -398,7 +398,9 @@ have been known to be susceptible to malicious attacks when string data is acqui GUIX library releases prior to release 5.6 defined API functions which accepted (`GX_CONST GX_CHAR *text`) as a parameter. These functions, while still supported for backwards compatibility, have been obsoleted and replaced by the preferred API functions which accept (`GX_CONST GX_STRING *string`) as an input parameter. -By default, the deprecated text handling API is enabled allowing all previously written applications to build cleanly with the latest updates to the GUIX library. To disable the deprecated text handling API, the definition *GX_DISABLE_DEPRECATED_STRING_API* should be added to the *_gx_user.h_* header file. All new applications should define *GX_DISABLE_DEPRECATED_STRING_API* and should use only the replacement API functions. All output files generated by GUIX Studio for GUIX library version release 5.6 or later will utilize only the replacement API functions. +WARNING: *_Do not use the deprecated string API in new code._* The pre-5.6 `GX_CHAR *` functions do not carry a string length. They cannot safely handle strings that are not NUL-terminated and cannot prevent callers from supplying oversized buffers. The `GX_STRING`-based replacement functions include an explicit `gx_string_length` field that enables bounds checking throughout the library. + +By default, the deprecated text handling API is enabled allowing all previously written applications to build cleanly with the latest updates to the GUIX library. To disable the deprecated text handling API, the definition *GX_DISABLE_DEPRECATED_STRING_API* should be added to the *_gx_user.h_* header file. *All new applications should define GX_DISABLE_DEPRECATED_STRING_API* and should use only the replacement API functions. All output files generated by GUIX Studio for GUIX library version release 5.6 or later will utilize only the replacement API functions. When the deprecated API is enabled, a compile-time warning is emitted to remind developers to migrate. The following table lists the deprecated and newly defined replacement API function names: diff --git a/rtos-docs/threadx-modules/modules/ROOT/pages/chapter4.adoc b/rtos-docs/threadx-modules/modules/ROOT/pages/chapter4.adoc index e7963d2..2bb30db 100644 --- a/rtos-docs/threadx-modules/modules/ROOT/pages/chapter4.adoc +++ b/rtos-docs/threadx-modules/modules/ROOT/pages/chapter4.adoc @@ -11,6 +11,7 @@ Contributors: * Frédéric Desbiens - Initial AsciiDoc version. + * Frédéric Desbiens - Added deprecation notices for txm_module_object_deallocate and txm_module_object_pointer_get. //// @@ -187,6 +188,10 @@ status = txm_module_object_deallocate(queue_pointer); Find system object and retrieve object pointer +WARNING: *_This service is deprecated. Do not use it in new code._* Use <> instead, passing the actual length of the name buffer. + +This function passes `UINT_MAX` as the name-buffer length to the underlying search. If the `name` pointer addresses a buffer shorter than the object name being compared, the comparison loop reads past the end of the buffer, which is undefined behaviour. + === Prototype [,c] @@ -198,7 +203,7 @@ UINT txm_module_object_pointer_get( === Description -This service retrieves the object pointer of a particular type with a particular name. If the object is not found, an error is returned. Otherwise, if the object is found, the address of that object is placed in "object_ptr." This pointer can then be used to make system service calls, to interact with the resident code, and/or other loaded modules in the system. +*_Deprecated — see above._* This service retrieves the object pointer of a particular type with a particular name. If the object is not found, an error is returned. Otherwise, if the object is found, the address of that object is placed in "object_ptr." === Input parameters diff --git a/rtos-docs/usbx/modules/ROOT/pages/usbx-device-stack-4.adoc b/rtos-docs/usbx/modules/ROOT/pages/usbx-device-stack-4.adoc index c1aa72a..0c27fce 100644 --- a/rtos-docs/usbx/modules/ROOT/pages/usbx-device-stack-4.adoc +++ b/rtos-docs/usbx/modules/ROOT/pages/usbx-device-stack-4.adoc @@ -712,6 +712,8 @@ This function is called when the host queries the current interface. The device NOTE: This function is deprecated. It is available for legacy software, but new software should use the *_ux_device_stack_alternate_setting_get_* function instead. +WARNING: *_Do not use this function in new code._* It was renamed to *_ux_device_stack_alternate_setting_get_* to better reflect its semantics. The two functions are otherwise identical. + [discrete] === Input Parameter