Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion common/src/fx_directory_long_name_get.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@
#include "fx_directory.h"


/* DEPRECATION NOTICE
* fx_directory_long_name_get() is deprecated. Do not use it in new code.
*
* WHY: Does not accept a destination buffer length; writes up to FX_MAX_LONG_NAME_LEN bytes regardless of the caller's buffer size, risking a buffer overrun.
*
* WHAT TO DO: replace calls with fx_directory_long_name_get_extended(), passing the actual
* destination buffer size as an additional argument.
*/
#pragma message("fx_directory_long_name_get() is deprecated. " \
"Use fx_directory_long_name_get_extended() and pass the actual buffer size.")

/**************************************************************************/
/* */
/* FUNCTION RELEASE */
Expand All @@ -45,7 +56,8 @@
/* name. If there is no long file name, the short file name will be */
/* returned. */
/* */
/* Note, this API is deprecated as fx_directory_long_name_get_extended */
/* DEPRECATED. Use fx_directory_long_name_get_extended() instead, passing the actual
destination buffer length. Does not accept a destination buffer length; writes up to FX_MAX_LONG_NAME_LEN bytes regardless of the caller's buffer size, risking a buffer overrun.
/* should be used. The maximum written size to long_file_name could be */
/* FX_MAX_LONG_NAME_LEN. */
/* */
Expand Down
14 changes: 13 additions & 1 deletion common/src/fx_directory_short_name_get.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@
#include "fx_directory.h"


/* DEPRECATION NOTICE
* fx_directory_short_name_get() is deprecated. Do not use it in new code.
*
* WHY: Does not accept a destination buffer length; writes up to FX_MAX_SHORT_NAME_LEN bytes regardless of the caller's buffer size, risking a buffer overrun.
*
* WHAT TO DO: replace calls with fx_directory_short_name_get_extended(), passing the actual
* destination buffer size as an additional argument.
*/
#pragma message("fx_directory_short_name_get() is deprecated. " \
"Use fx_directory_short_name_get_extended() and pass the actual buffer size.")

/**************************************************************************/
/* */
/* FUNCTION RELEASE */
Expand All @@ -45,7 +56,8 @@
/* name. If the long file name is really a short file name, the short */
/* file name will be returned. */
/* */
/* Note, this API is deprecated as fx_directory_short_name_get_extended*/
/* DEPRECATED. Use fx_directory_short_name_get_extended() instead, passing the actual
destination buffer length. Does not accept a destination buffer length; writes up to FX_MAX_SHORT_NAME_LEN bytes regardless of the caller's buffer size, risking a buffer overrun.
/* should be used. The maximum written size to short_file_name could */
/* be FX_MAX_SHORT_NAME_LEN. */
/* */
Expand Down
14 changes: 13 additions & 1 deletion common/src/fx_media_volume_get.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,17 @@
#include "fx_utility.h"


/* DEPRECATION NOTICE
* fx_media_volume_get() is deprecated. Do not use it in new code.
*
* WHY: Does not accept a volume-name buffer length; writes up to 12 bytes regardless of the caller's buffer size, risking a buffer overrun.
*
* WHAT TO DO: replace calls with fx_media_volume_get_extended(), passing the actual
* destination buffer size as an additional argument.
*/
#pragma message("fx_media_volume_get() is deprecated. " \
"Use fx_media_volume_get_extended() and pass the actual buffer size.")

/**************************************************************************/
/* */
/* FUNCTION RELEASE */
Expand All @@ -47,7 +58,8 @@
/* This function reads the volume name stored in the media's boot */
/* record or root directory. */
/* */
/* Note, this API is deprecated as fx_media_volume_get_extended should */
/* DEPRECATED. Use fx_media_volume_get_extended() instead, passing the actual
destination buffer length. Does not accept a volume-name buffer length; writes up to 12 bytes regardless of the caller's buffer size, risking a buffer overrun.
/* be used. The maximum written size to volume_name could be 12. */
/* */
/* INPUT */
Expand Down
14 changes: 13 additions & 1 deletion common/src/fx_unicode_length_get.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@
#include "fx_unicode.h"


/* DEPRECATION NOTICE
* fx_unicode_length_get() is deprecated. Do not use it in new code.
*
* WHY: Does not accept a buffer length; scans up to 256 bytes regardless of the actual buffer size, risking an overread.
*
* WHAT TO DO: replace calls with fx_unicode_length_get_extended(), passing the actual
* destination buffer size as an additional argument.
*/
#pragma message("fx_unicode_length_get() is deprecated. " \
"Use fx_unicode_length_get_extended() and pass the actual buffer size.")

/**************************************************************************/
/* */
/* FUNCTION RELEASE */
Expand All @@ -43,7 +54,8 @@
/* */
/* This function returns the length of the supplied unicode name. */
/* */
/* Note, this API is deprecated as _fx_unicode_length_get_extended */
/* DEPRECATED. Use fx_unicode_length_get_extended() instead, passing the actual
destination buffer length. Does not accept a buffer length; scans up to 256 bytes regardless of the actual buffer size, risking an overread.
/* should be used. The maximum buffer size of unicode_name is 256. */
/* */
/* INPUT */
Expand Down
14 changes: 13 additions & 1 deletion common/src/fx_unicode_name_get.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@
#include "fx_unicode.h"


/* DEPRECATION NOTICE
* fx_unicode_name_get() is deprecated. Do not use it in new code.
*
* WHY: Does not accept a destination buffer length; writes up to FX_MAX_LONG_NAME_LEN*2 bytes regardless of the caller's buffer size, risking a buffer overrun.
*
* WHAT TO DO: replace calls with fx_unicode_name_get_extended(), passing the actual
* destination buffer size as an additional argument.
*/
#pragma message("fx_unicode_name_get() is deprecated. " \
"Use fx_unicode_name_get_extended() and pass the actual buffer size.")

/**************************************************************************/
/* */
/* FUNCTION RELEASE */
Expand All @@ -44,7 +55,8 @@
/* This function finds the unicode name associated with the supplied */
/* short 8.3 name. */
/* */
/* Note, this API is deprecated as fx_unicode_name_get_extended should */
/* DEPRECATED. Use fx_unicode_name_get_extended() instead, passing the actual
destination buffer length. Does not accept a destination buffer length; writes up to FX_MAX_LONG_NAME_LEN*2 bytes regardless of the caller's buffer size, risking a buffer overrun.
/* be used. The maximum written size to destination_unicode_name could */
/* be FX_MAX_LONG_NAME_LEN * 2. */
/* */
Expand Down
14 changes: 13 additions & 1 deletion common/src/fx_unicode_short_name_get.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@
#include "fx_unicode.h"


/* DEPRECATION NOTICE
* fx_unicode_short_name_get() is deprecated. Do not use it in new code.
*
* WHY: Does not accept a destination buffer length; writes up to 13 bytes regardless of the caller's buffer size, risking a buffer overrun.
*
* WHAT TO DO: replace calls with fx_unicode_short_name_get_extended(), passing the actual
* destination buffer size as an additional argument.
*/
#pragma message("fx_unicode_short_name_get() is deprecated. " \
"Use fx_unicode_short_name_get_extended() and pass the actual buffer size.")

/**************************************************************************/
/* */
/* FUNCTION RELEASE */
Expand All @@ -44,7 +55,8 @@
/* This function finds the short name associated with the supplied */
/* unicode name. */
/* */
/* Note, this API is deprecated as fx_unicode_short_name_get_extended */
/* DEPRECATED. Use fx_unicode_short_name_get_extended() instead, passing the actual
destination buffer length. Does not accept a destination buffer length; writes up to 13 bytes regardless of the caller's buffer size, risking a buffer overrun.
/* should be used. The maximum written size to destination_short_name */
/* could be 13. */
/* */
Expand Down