[Nagiosplug-devel] [PATCH] fix SEGV of check_radius

Nobuhiro Ban ban.nobuhiro at gmail.com
Sun Oct 29 12:10:39 CET 2006


Hi all,

I got a segfault when I ran check_radius.
So I read check_radius.c and found `data' was used uninitialized in main().
After fixing this problem, it looks ok.

Here is the patch:

--- nagios-plugins-HEAD-200610282352/plugins/check_radius.c.orig	2006-10-20
08:53:28.000000000 +0900
+++ nagios-plugins-HEAD-200610282352/plugins/check_radius.c	2006-10-29
17:30:31.000000000 +0900
@@ -139,6 +139,7 @@

 	service = PW_AUTHENTICATE_ONLY;

+	memset (&data, 0, sizeof data);
 	if (!(rc_avpair_add (&data.send_pairs, PW_SERVICE_TYPE, &service, 0) &&
 				rc_avpair_add (&data.send_pairs, PW_USER_NAME, username, 0) &&
 				rc_avpair_add (&data.send_pairs, PW_USER_PASSWORD, password, 0) &&




More information about the Devel mailing list