[PATCH 06/10] [Msvcrt]: now using pmt checking macros for strtok_s
Eric Pouech
eric.pouech at orange.fr
Fri Oct 29 08:39:14 CDT 2010
A+
---
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;
}
More information about the wine-patches
mailing list