aboutsummaryrefslogtreecommitdiffstats
path: root/testing/radsecproxy/0001-fix-memory-allocation-in-t_rewrite_config-fix-71.patch
diff options
context:
space:
mode:
authorJosef Vybíhal <josef.vybihal@gmail.com>2020-08-21 12:29:51 +0200
committerLeo <thinkabit.ukim@gmail.com>2020-09-20 17:51:16 -0300
commit2c6abe985ea467477fb35863134914d08d78230c (patch)
tree852465af0cab2ef2fe60a7555ffa5fbdd2773c9d /testing/radsecproxy/0001-fix-memory-allocation-in-t_rewrite_config-fix-71.patch
parentb5da7842e3f9dd7d11e4ffc1f1e805dde02477fc (diff)
downloadaports-2c6abe985ea467477fb35863134914d08d78230c.tar.gz
aports-2c6abe985ea467477fb35863134914d08d78230c.tar.bz2
aports-2c6abe985ea467477fb35863134914d08d78230c.tar.xz
testing/radsecproxy: new aport
https://github.com/radsecproxy/radsecproxy radsecproxy is a generic RADIUS proxy that supports both UDP and TLS (RadSec) RADIUS transports. testing/
Diffstat (limited to 'testing/radsecproxy/0001-fix-memory-allocation-in-t_rewrite_config-fix-71.patch')
-rw-r--r--testing/radsecproxy/0001-fix-memory-allocation-in-t_rewrite_config-fix-71.patch56
1 files changed, 56 insertions, 0 deletions
diff --git a/testing/radsecproxy/0001-fix-memory-allocation-in-t_rewrite_config-fix-71.patch b/testing/radsecproxy/0001-fix-memory-allocation-in-t_rewrite_config-fix-71.patch
new file mode 100644
index 0000000000..af07c29f7b
--- /dev/null
+++ b/testing/radsecproxy/0001-fix-memory-allocation-in-t_rewrite_config-fix-71.patch
@@ -0,0 +1,56 @@
+From 7151b71afb2dfc748ed2ca7c124e271b4f390206 Mon Sep 17 00:00:00 2001
+From: Fabian Mauchle <mauchle@macfma.switch.ch>
+Date: Fri, 4 Sep 2020 13:08:54 +0200
+Subject: [PATCH] fix memory allocation in t_rewrite_config (fix #71)
+
+---
+ tests/t_rewrite.c | 1 +
+ tests/t_rewrite_config.c | 6 ++----
+ 2 files changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/tests/t_rewrite.c b/tests/t_rewrite.c
+index 80d6bee..184accf 100644
+--- a/tests/t_rewrite.c
++++ b/tests/t_rewrite.c
+@@ -685,6 +685,7 @@ main (int argc, char *argv[])
+ printf("not ");
+ printf("ok %d - issue #62\n", testcount++);
+
++ regfree(&regex);
+ _tlv_list_clear(origattrs);
+ _tlv_list_clear(expectedattrs);
+ _reset_rewrite(&rewrite);
+diff --git a/tests/t_rewrite_config.c b/tests/t_rewrite_config.c
+index 129bbbd..6d3f043 100644
+--- a/tests/t_rewrite_config.c
++++ b/tests/t_rewrite_config.c
+@@ -23,7 +23,7 @@ main (int argc, char *argv[])
+ numtests = 1;
+
+ {
+- addattrs = malloc(2);
++ addattrs = malloc(2*sizeof(char*));
+ addattrs[0] = stringcopy("1:'1%00%001%41%2541", 0);
+ addattrs[1] = NULL;
+
+@@ -55,7 +55,7 @@ main (int argc, char *argv[])
+ /* test issue #62 */
+ {
+ char *expectreplace = "\\1=86400";
+- char **modvattrs = malloc(2);
++ char **modvattrs = malloc(2*sizeof(char*));
+ rewritename= "issue62";
+
+ modvattrs[0] = stringcopy("9:102:/^(h323-credit-time).*$/\\1=86400/",0);
+@@ -79,8 +79,6 @@ main (int argc, char *argv[])
+ } else {
+ printf("not ok %d - rewrite config issue #62\n", numtests++);
+ }
+-
+- free(modvattrs);
+ }
+
+ return 0;
+--
+2.28.0
+