libprelude/master: Fix prelude-client initialization problem with empty argv[0]
[email protected] Wed, 8 Jul 2009 16:51:57 +0200 (CEST)
| Newsgroups | gmane.comp.security.ids.prelude.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit e824ff3d94472fed6bb5d9c8562f2f14e4405ce3 Author: Yoann Vandoorselaere <[email protected]> Date: Thu Jun 25 09:39:19 2009 +0200 Fix prelude-client initialization problem with empty argv[0] prelude_client_init() could return an error if argc was 1 but argv[0] was empty. Make sure to not call _prelude_get_file_name_and_path() in this specific case. ======================================== src/prelude-client.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) ======================================== diff --git a/src/prelude-client.c b/src/prelude-client.c index 247bf8c..d97142c 100644 --- a/src/prelude-client.c +++ b/src/prelude-client.c @@ -451,7 +451,7 @@ static int fill_client_infos(prelude_client_t *client, const char *program) idmef_process_set_pid(process, getpid()); - if ( ! program ) + if ( ! program || ! *program ) return 0; name = path = NULL; _______________________________________________ Prelude-cvslog site list [email protected] http://lists.prelude-ids.org/mailman/listinfo/prelude-cvslog