Show: Object Pascal C++
Display Preferences

String Comparison Warnings

From Appmethod Topics
Jump to: navigation, search

Go Up to CodeGuard Warnings Index

Each of the following functions has a parameter that determines the maximum number of bytes it compares:

  • strncmp
  • strnicmp
  • strncmpi
  • _fstrncmp
  • _fstrnicmp

If the Warnings option is enabled for the functions listed, CodeGuard verifies that a string comparison can be performed for each buffer passed to the function. If the buffer size is too large, as determined by the parameter passed to the function, and the buffer is not null-terminated, CodeGuard generates a warning.

If the Warnings option is disabled for the functions listed above, CodeGuard checks the first byte in each memory block passed to the function. If the memory block is invalid, CodeGuard generates an error message.

Personal tools
In other languages