summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Weiss <hweiss@users.sourceforge.net>2007-01-23 16:42:01 (GMT)
committerHolger Weiss <hweiss@users.sourceforge.net>2007-01-23 16:42:01 (GMT)
commit5aa4d5bbb9383299afa38617f0310bce57dddbc5 (patch)
tree6df57104a5308b690f16733d8763524853829b45
parent63028dedabed52b4ef3f12b1fc8b2878c3088145 (diff)
downloadmonitoring-plugins-5aa4d5bbb9383299afa38617f0310bce57dddbc5.tar.gz
Initialize `data' to zero, fixes potential segfault (Nobuhiro Ban - 1642658)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1576 f882894a-f735-0410-b71e-b25c423dba1c
-rw-r--r--THANKS.in1
-rw-r--r--plugins/check_radius.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/THANKS.in b/THANKS.in
index 0d0f4a5..584fee0 100644
--- a/THANKS.in
+++ b/THANKS.in
@@ -207,3 +207,4 @@ Matthias Eble
207Sebastian Schubert 207Sebastian Schubert
208Jason Hoos 208Jason Hoos
209Chris Grim 209Chris Grim
210Nobuhiro Ban
diff --git a/plugins/check_radius.c b/plugins/check_radius.c
index 6d42e1d..b1bb928 100644
--- a/plugins/check_radius.c
+++ b/plugins/check_radius.c
@@ -139,6 +139,7 @@ main (int argc, char **argv)
139 139
140 service = PW_AUTHENTICATE_ONLY; 140 service = PW_AUTHENTICATE_ONLY;
141 141
142 memset (&data, 0, sizeof(data));
142 if (!(rc_avpair_add (&data.send_pairs, PW_SERVICE_TYPE, &service, 0) && 143 if (!(rc_avpair_add (&data.send_pairs, PW_SERVICE_TYPE, &service, 0) &&
143 rc_avpair_add (&data.send_pairs, PW_USER_NAME, username, 0) && 144 rc_avpair_add (&data.send_pairs, PW_USER_NAME, username, 0) &&
144 rc_avpair_add (&data.send_pairs, PW_USER_PASSWORD, password, 0) && 145 rc_avpair_add (&data.send_pairs, PW_USER_PASSWORD, password, 0) &&