]> git.pld-linux.org Git - packages/nagios-plugins.git/blob - nagios-plugins-check_radius_segfault.patch
Rediff patches.
[packages/nagios-plugins.git] / nagios-plugins-check_radius_segfault.patch
1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## 27_check_radius_segfault.dpatch by Yasper Casper <komputnik@gmail.com>
3 ##
4
5 @DPATCH@
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"));
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  
23         memset (&data, 0, sizeof(data));
This page took 0.090388 seconds and 3 git commands to generate.