]>
Commit | Line | Data |
---|---|---|
15099191 ER |
1 | #! /bin/sh /usr/share/dpatch/dpatch-run |
2 | ## 27_check_radius_segfault.dpatch by Yasper Casper <komputnik@gmail.com> | |
3 | ## | |
4 | ||
5 | @DPATCH@ | |
d76fcccd AM |
6 | diff -urNp -x '*.orig' nagios-plugins-2.3.3.org/plugins/check_radius.c nagios-plugins-2.3.3/plugins/check_radius.c |
7 | --- nagios-plugins-2.3.3.org/plugins/check_radius.c 2019-12-04 22:53:08.000000000 +0100 | |
8 | +++ nagios-plugins-2.3.3/plugins/check_radius.c 2021-04-19 12:01:35.422382755 +0200 | |
9 | @@ -185,6 +185,14 @@ main (int argc, char **argv) | |
10 | my_rc_read_dictionary (my_rc_conf_str (str))) | |
11 | die (STATE_UNKNOWN, _("Config file error\n")); | |
15099191 ER |
12 | |
13 | + /* Initialize Value Pair to prevent segfault on rc_avpair_add. | |
14 | + * debugging on radiuslib-ng show that the mem isn't allocated, | |
15 | + * and some random memory is in the USER-PASSWORD pair. | |
16 | + * So, after initialization, the password is filled with the correct values | |
17 | + */ | |
18 | + data.send_pairs = NULL; | |
19 | + data.receive_pairs = NULL; | |
20 | + | |
21 | service = PW_AUTHENTICATE_ONLY; | |
22 | ||
d76fcccd | 23 | memset (&data, 0, sizeof(data)); |