SSIA

Regards,
  Honza
commit e3e41c39ad213d5487b22fa0fe2d3d25d8096c47
Author: Jan Friesse <[email protected]>
Date:   Wed Jul 22 10:33:46 2009 +0200

    Handle NULL ver string in service
    
    In case user not enter ver: in service section, whole
    corosync falled with segfaul, because atoi was called
    on NULL.
    
    Now, in case of NULL, we rather not use atoi, and
    return 0 directly.

diff --git a/trunk/exec/service.c b/trunk/exec/service.c
index 1b8b411..717b736 100644
--- a/trunk/exec/service.c
+++ b/trunk/exec/service.c
@@ -405,7 +405,7 @@ unsigned int corosync_service_defaults_link_and_init (struct corosync_api_v1 *co
 			(void *)&found_service_ver,
 			NULL);
 
-		found_service_ver_atoi = atoi (found_service_ver);
+		found_service_ver_atoi = (found_service_ver ? atoi (found_service_ver) : 0);
 
 		corosync_service_link_and_init (
 			corosync_api,
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to