summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-devel/bc/files')
-rw-r--r--sys-devel/bc/files/bc-1.06.95-mem-leak.patch24
-rw-r--r--sys-devel/bc/files/bc-1.06.95-void_uninitialized.patch13
2 files changed, 37 insertions, 0 deletions
diff --git a/sys-devel/bc/files/bc-1.06.95-mem-leak.patch b/sys-devel/bc/files/bc-1.06.95-mem-leak.patch
new file mode 100644
index 000000000000..13628464b540
--- /dev/null
+++ b/sys-devel/bc/files/bc-1.06.95-mem-leak.patch
@@ -0,0 +1,24 @@
+https://bugs.gentoo.org/264889
+
+--- a/bc/bc.y
++++ b/bc/bc.y
+@@ -569,6 +569,7 @@ expression : named_expression ASSIGN_OP
+ generate (">");
+ break;
+ }
++ free($2);
+ }
+ | expression '+' expression
+ {
+--- a/bc/util.c
++++ b/bc/util.c
+@@ -602,8 +602,7 @@ lookup (name, namekind)
+ case FUNCTDEF:
+ if (id->f_name != 0)
+ {
+- if (namekind != FUNCT)
+- free(name);
++ free(name);
+ /* Check to see if we are redefining a math lib function. */
+ if (use_math && namekind == FUNCTDEF && id->f_name <= 6)
+ id->f_name = next_func++;
diff --git a/sys-devel/bc/files/bc-1.06.95-void_uninitialized.patch b/sys-devel/bc/files/bc-1.06.95-void_uninitialized.patch
new file mode 100644
index 000000000000..3304973f89af
--- /dev/null
+++ b/sys-devel/bc/files/bc-1.06.95-void_uninitialized.patch
@@ -0,0 +1,13 @@
+http://www.pixelbeat.org/programming/oss_bug_flow.html
+https://bugs.gentoo.org/349339
+
+--- bc/storage.c
++++ bc/storage.c
+@@ -99,6 +99,7 @@
+ {
+ f = &functions[indx];
+ f->f_defined = FALSE;
++ f->f_void = FALSE;
+ f->f_body = (char *) bc_malloc (BC_START_SIZE);
+ f->f_body_size = BC_START_SIZE;
+ f->f_code_size = 0;