Eric Pouech : msvcrt: Use the new parameter checking macros for f(w) open_s functions.

Alexandre Julliard julliard at winehq.org
Mon Nov 1 11:54:34 CDT 2010


Module: wine
Branch: master
Commit: 00f07046c0be658d97c47f69e1b4c518bc06b3a2
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=00f07046c0be658d97c47f69e1b4c518bc06b3a2

Author: Eric Pouech <eric.pouech at orange.fr>
Date:   Fri Oct 29 15:38:57 2010 +0200

msvcrt: Use the new parameter checking macros for f(w)open_s functions.

---

 dlls/msvcrt/file.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c
index f906401..3eb93ac 100644
--- a/dlls/msvcrt/file.c
+++ b/dlls/msvcrt/file.c
@@ -2686,8 +2686,8 @@ MSVCRT_FILE * CDECL MSVCRT_fopen(const char *path, const char *mode)
 int CDECL MSVCRT_fopen_s(MSVCRT_FILE** pFile,
         const char *filename, const char *mode)
 {
-    if(!pFile) {
-        MSVCRT__invalid_parameter(NULL, NULL, NULL, 0, 0);
+    if (!MSVCRT_CHECK_PMT(pFile != NULL) || !MSVCRT_CHECK_PMT(filename != NULL) ||
+        MSVCRT_CHECK_PMT(mode != NULL)) {
         *MSVCRT__errno() = MSVCRT_EINVAL;
         return MSVCRT_EINVAL;
     }
@@ -2713,8 +2713,8 @@ MSVCRT_FILE * CDECL MSVCRT__wfopen(const MSVCRT_wchar_t *path, const MSVCRT_wcha
 int CDECL MSVCRT__wfopen_s(MSVCRT_FILE** pFile, const MSVCRT_wchar_t *filename,
         const MSVCRT_wchar_t *mode)
 {
-    if(!pFile) {
-        MSVCRT__invalid_parameter(NULL, NULL, NULL, 0, 0);
+    if (!MSVCRT_CHECK_PMT(pFile != NULL) || !MSVCRT_CHECK_PMT(filename != NULL) ||
+        MSVCRT_CHECK_PMT(mode != NULL)) {
         *MSVCRT__errno() = MSVCRT_EINVAL;
         return MSVCRT_EINVAL;
     }




More information about the wine-cvs mailing list