using safe string functions in wine

James Hawkins truiken at
Wed Feb 23 16:49:52 CST 2005


While perusing msdn recently, I stumbled across string safe functions.
 These functions were created to replace the standard c string
handling routines.  The following are some design criteria of string
safe functions (msdn):

* Always NULL-terminate the string.
* Always take a destination buffer size.
* Always return consistent return codes (an HRESULT).
* Support 32-bit and 64-bit environments.
* Flexibility.

What is your opinion on whether we should implement and use either the
user-mode or kernel-mode (or both) string safe functions?  Using these
functions instead of the standard c string functions would promote
consistency and security in the wine code base.  On the other hand,
using these functions adds another layer of calls to the code.  What
are other pro's and con's of using string safe functions?

James Hawkins

More information about the wine-devel mailing list