Zebediah Figura : server: Avoid a potential NULL dereference in startup_info_dump().
Alexandre Julliard
julliard at winehq.org
Wed Sep 2 15:24:32 CDT 2020
Module: wine
Branch: master
Commit: 74dc9aa33502ba89333ab4be3c7c1458015c1d56
URL: https://source.winehq.org/git/wine.git/?a=commit;h=74dc9aa33502ba89333ab4be3c7c1458015c1d56
Author: Zebediah Figura <zfigura at codeweavers.com>
Date: Tue Sep 1 17:22:20 2020 -0500
server: Avoid a potential NULL dereference in startup_info_dump().
info->data may be set to NULL by get_startup_info, without invalidating the
object itself.
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
server/process.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/server/process.c b/server/process.c
index c1bdb591f6..9bf5e447d3 100644
--- a/server/process.c
+++ b/server/process.c
@@ -749,8 +749,11 @@ static void startup_info_dump( struct object *obj, int verbose )
struct startup_info *info = (struct startup_info *)obj;
assert( obj->ops == &startup_info_ops );
- fprintf( stderr, "Startup info in=%04x out=%04x err=%04x\n",
- info->data->hstdin, info->data->hstdout, info->data->hstderr );
+ fputs( "Startup info", stderr );
+ if (info->data)
+ fprintf( stderr, " in=%04x out=%04x err=%04x",
+ info->data->hstdin, info->data->hstdout, info->data->hstderr );
+ fputc( '\n', stderr );
}
static int startup_info_signaled( struct object *obj, struct wait_queue_entry *entry )
More information about the wine-cvs
mailing list