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@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2020-09-01 17:22:20 -05:00 committed by Alexandre Julliard
parent 4ee4fffafa
commit 74dc9aa335
1 changed files with 5 additions and 2 deletions

View File

@ -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",
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 )