[PATCH 0/1] MR1600: loader: Assert if argc/argv/environ are invalid.
29 Nov
29 Nov
9:45 p.m.
New subject: [PATCH 1/1] loader: Assert if argc/argv/environ are invalid.
From: Brendan Shanks <bshanks(a)codeweavers.com> --- loader/main.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/loader/main.c b/loader/main.c index 242ff15accd..d21e1fa089f 100644 --- a/loader/main.c +++ b/loader/main.c @@ -20,6 +20,7 @@ #include "config.h" +#include <assert.h> #include <fcntl.h> #include <pthread.h> #include <stdio.h> @@ -177,6 +178,11 @@ int main( int argc, char *argv[] ) { void *handle; + assert( argc > 0 ); + assert( argv ); + assert( argv[0] ); + assert( environ ); + if ((handle = load_ntdll( argv[0] ))) { void (*init_func)(int, char **, char **) = dlsym( handle, "__wine_main" ); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/1600
1119
Age (days ago)
1119
Last active (days ago)
1 comments
2 participants
participants (2)
-
Brendan Shanks -
Brendan Shanks (@bshanks)