Index: BOOK/final-system/common/bc.xml
===================================================================
--- BOOK/final-system/common/bc.xml	(revision 8343d5e9429821e1ce475735fd7e6975887d4bb0)
+++ BOOK/final-system/common/bc.xml	(revision 4e8ba513f78c55ee9b319a32c41d1eb532824f79)
@@ -25,7 +25,18 @@
     <title>Installation of Bc</title>
 
-    <para os="p1">Fix memory leaks:</para>
+    <para os="s1">Change an internal script to use <command>sed</command> 
+        instead of <command>ed</command>:</para>
 
-<screen os="p2"><userinput>patch -Np1 -i ../bc-1.06.95-memory_leak-1.patch</userinput></screen>
+<screen os="s2"><userinput>cat &gt; bc/fix-libmath_h &lt;&lt; "EOF"
+#! /bin/bash
+sed -e '1   s/^/{"/' \
+    -e     's/$/",/' \
+    -e '2,$ s/^/"/'  \
+    -e   '$ d'       \
+    -i libmath.h
+
+sed -e '$ s/$/0}/' \
+-i libmath.h
+EOF</userinput></screen>
 
     <para os="a">Prepare Bc for compilation:</para>
Index: BOOK/final-system/multilib/bc.xml
===================================================================
--- BOOK/final-system/multilib/bc.xml	(revision 8343d5e9429821e1ce475735fd7e6975887d4bb0)
+++ BOOK/final-system/multilib/bc.xml	(revision 4e8ba513f78c55ee9b319a32c41d1eb532824f79)
@@ -24,9 +24,9 @@
     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
     href="../common/bc.xml"
-    xpointer="xpointer(//*[@os='p1'])"/>
+    xpointer="xpointer(//*[@os='s1'])"/>
 
     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
     href="../common/bc.xml"
-    xpointer="xpointer(//*[@os='p2'])"/>
+    xpointer="xpointer(//*[@os='s2'])"/>
 
     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
Index: BOOK/introduction/common/changelog.xml
===================================================================
--- BOOK/introduction/common/changelog.xml	(revision 8343d5e9429821e1ce475735fd7e6975887d4bb0)
+++ BOOK/introduction/common/changelog.xml	(revision 4e8ba513f78c55ee9b319a32c41d1eb532824f79)
@@ -40,8 +40,11 @@
       <itemizedlist>
         <listitem>
+          <para>[William Harrington] - Upgrade BC to 1.07. Fixes
+          ticket <ulink url="&clfs-ticket-root;1105">#1124.</ulink></para> 
+        </listitem>
+        <listitem>
           <para>[William Harrington] - Upgrade Grep to 3.0. Fixes
           ticket <ulink url="&clfs-ticket-root;1105">#1107.</ulink></para> 
         </listitem>
-
         <listitem>
           <para>[William Harrington] - Upgrade Readline to 7.0. Fixes
Index: BOOK/materials/common/patches.xml
===================================================================
--- BOOK/materials/common/patches.xml	(revision 8343d5e9429821e1ce475735fd7e6975887d4bb0)
+++ BOOK/materials/common/patches.xml	(revision 4e8ba513f78c55ee9b319a32c41d1eb532824f79)
@@ -25,13 +25,4 @@
         url="&patches-root;&bash-branch_update-patch;"/></para>
         <para>MD5 sum: <literal>&bash-branch_update-patch-md5;</literal></para>
-      </listitem>
-    </varlistentry>
-
-    <varlistentry>
-      <term>Bc Memory Leak Patch - <token>&bc-memory-leak-patch-size;</token>:</term>
-      <listitem>
-        <para>Download: <ulink
-        url="&patches-root;&bc-memory-leak-patch;"/></para>
-        <para>MD5 sum: <literal>&bc-memory-leak-patch-md5;</literal></para>
       </listitem>
     </varlistentry>
Index: BOOK/packages.ent
===================================================================
--- BOOK/packages.ent	(revision 8343d5e9429821e1ce475735fd7e6975887d4bb0)
+++ BOOK/packages.ent	(revision 4e8ba513f78c55ee9b319a32c41d1eb532824f79)
@@ -43,8 +43,8 @@
 <!ENTITY bash-home "&gnu-software;bash">
 
-<!ENTITY bc-version "1.06.95">
-<!ENTITY bc-size "284 KB">
+<!ENTITY bc-version "1.07">
+<!ENTITY bc-size "420 KB">
 <!ENTITY bc-url "&alpha-gnu;bc/bc-&bc-version;.tar.bz2">
-<!ENTITY bc-md5 "5126a721b73f97d715bb72c13c889035">
+<!ENTITY bc-md5 "cda93857418655ea43590736fc3ca9fc">
 <!ENTITY bc-home "&gnu-software;bc/">
 
Index: BOOK/patches.ent
===================================================================
--- BOOK/patches.ent	(revision 8343d5e9429821e1ce475735fd7e6975887d4bb0)
+++ BOOK/patches.ent	(revision 4e8ba513f78c55ee9b319a32c41d1eb532824f79)
@@ -8,8 +8,4 @@
 <!ENTITY bash-branch_update-patch-md5 "9f59bec94bfd1023d9c6a76b49187420">
 <!ENTITY bash-branch_update-patch-size "17 KB">
-
-<!ENTITY bc-memory-leak-patch "bc-&bc-version;-memory_leak-1.patch">
-<!ENTITY bc-memory-leak-patch-md5 "877e81fba316fe487ec23501059d54b8">
-<!ENTITY bc-memory-leak-patch-size "1.414 KB">
 
 <!-- Binutils branch update area
Index: tches/bc-1.06.95-memory_leak-1.patch
===================================================================
--- patches/bc-1.06.95-memory_leak-1.patch	(revision 8343d5e9429821e1ce475735fd7e6975887d4bb0)
+++ 	(revision )
@@ -1,41 +1,0 @@
-Submitted By: Bruce Dubbs (bdubbs at linuxfromscratch dot org)
-Date: 2014-04-18
-Initial Package Version: 1.06.95
-Origin: Gentoo
-Description: Fixes memory leaks and an uninitialized variable
- 
-diff -Naur bc-1.06.95.orig/bc/bc.y bc-1.06.95/bc/bc.y
---- bc-1.06.95.orig/bc/bc.y	2006-09-04 21:39:31.000000000 -0500
-+++ bc-1.06.95/bc/bc.y	2014-04-09 13:27:04.602661243 -0500
-@@ -569,6 +569,7 @@
- 				    generate (">");
- 				  break;
- 				}
-+			        free($2);	
- 			    }
- 			| expression '+' expression
- 			    {
-diff -Naur bc-1.06.95.orig/bc/storage.c bc-1.06.95/bc/storage.c
---- bc-1.06.95.orig/bc/storage.c	2006-09-04 21:39:31.000000000 -0500
-+++ bc-1.06.95/bc/storage.c	2014-04-09 13:28:11.770763410 -0500
-@@ -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;
-diff -Naur bc-1.06.95.orig/bc/util.c bc-1.06.95/bc/util.c
---- bc-1.06.95.orig/bc/util.c	2006-09-04 21:39:31.000000000 -0500
-+++ bc-1.06.95/bc/util.c	2014-04-09 13:27:39.841190064 -0500
-@@ -602,8 +602,7 @@
-     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++;
