Eric Pouech : msvcrt: Use parameter checking macros for strtok_s.
Module: wine Branch: master Commit: 14187ed2aa9b2d42295519a895b511aa9bbfade0 URL: http://source.winehq.org/git/wine.git/?a=commit;h=14187ed2aa9b2d42295519a895... Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Fri Oct 29 15:39:14 2010 +0200 msvcrt: Use parameter checking macros for strtok_s. --- dlls/msvcrt/string.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/msvcrt/string.c b/dlls/msvcrt/string.c index 944c7e6..fb02bd5 100644 --- a/dlls/msvcrt/string.c +++ b/dlls/msvcrt/string.c @@ -152,8 +152,8 @@ char * CDECL MSVCRT_strtok( char *str, const char *delim ) */ char * CDECL MSVCRT_strtok_s(char *str, const char *delim, char **ctx) { - if(!delim || !ctx || (!str && !*ctx)) { - MSVCRT__invalid_parameter(NULL, NULL, NULL, 0, 0); + if (!MSVCRT_CHECK_PMT(delim != NULL) || !MSVCRT_CHECK_PMT(ctx != NULL) || + !MSVCRT_CHECK_PMT(str != NULL || *ctx != NULL)) { *MSVCRT__errno() = MSVCRT_EINVAL; return NULL; }
participants (1)
-
Alexandre Julliard