bzip2-1.0.6
diff --git a/CHANGES b/CHANGES
index 6e4f65e..81e97ca 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,8 +2,8 @@
  This file is part of bzip2/libbzip2, a program and library for
  lossless, block-sorting data compression.
 
- bzip2/libbzip2 version 1.0.5 of 10 December 2007
- Copyright (C) 1996-2007 Julian Seward <jseward@bzip.org>
+ bzip2/libbzip2 version 1.0.6 of 6 September 2010
+ Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
 
  Please read the WARNING, DISCLAIMER and PATENTS sections in the 
  README file.
@@ -317,3 +317,11 @@
 ~~~~~~~~~~~~~~~~~
 Security fix only.  Fixes CERT-FI 20469 as it applies to bzip2.
 
+
+1.0.6 (6 Sept 10)
+~~~~~~~~~~~~~~~~~
+
+* Security fix for CVE-2010-0405.  This was reported by Mikolaj
+  Izdebski.
+
+* Make the documentation build on Ubuntu 10.04
diff --git a/LICENSE b/LICENSE
index f420cff..cc61417 100644
--- a/LICENSE
+++ b/LICENSE
@@ -2,7 +2,7 @@
 --------------------------------------------------------------------------
 
 This program, "bzip2", the associated library "libbzip2", and all
-documentation, are copyright (C) 1996-2007 Julian R Seward.  All
+documentation, are copyright (C) 1996-2010 Julian R Seward.  All
 rights reserved.
 
 Redistribution and use in source and binary forms, with or without
@@ -37,6 +37,6 @@
 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 Julian Seward, jseward@bzip.org
-bzip2/libbzip2 version 1.0.5 of 10 December 2007
+bzip2/libbzip2 version 1.0.6 of 6 September 2010
 
 --------------------------------------------------------------------------
diff --git a/Makefile b/Makefile
index eb09753..9754ddf 100644
--- a/Makefile
+++ b/Makefile
@@ -2,8 +2,8 @@
 # This file is part of bzip2/libbzip2, a program and library for
 # lossless, block-sorting data compression.
 #
-# bzip2/libbzip2 version 1.0.5 of 10 December 2007
-# Copyright (C) 1996-2007 Julian Seward <jseward@bzip.org>
+# bzip2/libbzip2 version 1.0.6 of 6 September 2010
+# Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
 #
 # Please read the WARNING, DISCLAIMER and PATENTS sections in the 
 # README file.
@@ -137,7 +137,7 @@
 distclean: clean
 	rm -f manual.ps manual.html manual.pdf
 
-DISTNAME=bzip2-1.0.5
+DISTNAME=bzip2-1.0.6
 dist: check manual
 	rm -f $(DISTNAME)
 	ln -s -f . $(DISTNAME)
diff --git a/Makefile-libbz2_so b/Makefile-libbz2_so
index 9a13c77..e58791b 100644
--- a/Makefile-libbz2_so
+++ b/Makefile-libbz2_so
@@ -1,6 +1,6 @@
 
 # This Makefile builds a shared version of the library, 
-# libbz2.so.1.0.4, with soname libbz2.so.1.0,
+# libbz2.so.1.0.6, with soname libbz2.so.1.0,
 # at least on x86-Linux (RedHat 7.2), 
 # with gcc-2.96 20000731 (Red Hat Linux 7.1 2.96-98).  
 # Please see the README file for some important info 
@@ -10,8 +10,8 @@
 # This file is part of bzip2/libbzip2, a program and library for
 # lossless, block-sorting data compression.
 #
-# bzip2/libbzip2 version 1.0.5 of 10 December 2007
-# Copyright (C) 1996-2007 Julian Seward <jseward@bzip.org>
+# bzip2/libbzip2 version 1.0.6 of 6 September 2010
+# Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
 #
 # Please read the WARNING, DISCLAIMER and PATENTS sections in the 
 # README file.
@@ -35,13 +35,13 @@
       bzlib.o
 
 all: $(OBJS)
-	$(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.4 $(OBJS)
-	$(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.4
+	$(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.6 $(OBJS)
+	$(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.6
 	rm -f libbz2.so.1.0
-	ln -s libbz2.so.1.0.4 libbz2.so.1.0
+	ln -s libbz2.so.1.0.6 libbz2.so.1.0
 
 clean: 
-	rm -f $(OBJS) bzip2.o libbz2.so.1.0.4 libbz2.so.1.0 bzip2-shared
+	rm -f $(OBJS) bzip2.o libbz2.so.1.0.6 libbz2.so.1.0 bzip2-shared
 
 blocksort.o: blocksort.c
 	$(CC) $(CFLAGS) -c blocksort.c
diff --git a/README b/README
index e17a84e..9fb0f63 100644
--- a/README
+++ b/README
@@ -6,8 +6,8 @@
 This file is part of bzip2/libbzip2, a program and library for
 lossless, block-sorting data compression.
 
-bzip2/libbzip2 version 1.0.5 of 10 December 2007
-Copyright (C) 1996-2007 Julian Seward <jseward@bzip.org>
+bzip2/libbzip2 version 1.0.6 of 6 September 2010
+Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
 
 Please read the WARNING, DISCLAIMER and PATENTS sections in this file.
 
@@ -181,6 +181,10 @@
 
    See the CHANGES file.
 
+WHAT'S NEW IN 1.0.6 ?
+
+   See the CHANGES file.
+
 
 I hope you find bzip2 useful.  Feel free to contact me at
    jseward@bzip.org
@@ -208,3 +212,4 @@
 15 February 2005 (bzip2, version 1.0.3)
 20 December 2006 (bzip2, version 1.0.4)
 10 December 2007 (bzip2, version 1.0.5)
+ 6     Sept 2010 (bzip2, version 1.0.6)
diff --git a/README.COMPILATION.PROBLEMS b/README.COMPILATION.PROBLEMS
index 22b95c6..667d0d6 100644
--- a/README.COMPILATION.PROBLEMS
+++ b/README.COMPILATION.PROBLEMS
@@ -2,8 +2,8 @@
 This file is part of bzip2/libbzip2, a program and library for
 lossless, block-sorting data compression.
 
-bzip2/libbzip2 version 1.0.5 of 10 December 2007
-Copyright (C) 1996-2007 Julian Seward <jseward@bzip.org>
+bzip2/libbzip2 version 1.0.6 of 6 September 2010
+Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
 
 Please read the WARNING, DISCLAIMER and PATENTS sections in the 
 README file.
@@ -12,7 +12,7 @@
 in the file LICENSE.
 ------------------------------------------------------------------
 
-bzip2-1.0.5 should compile without problems on the vast majority of
+bzip2-1.0.6 should compile without problems on the vast majority of
 platforms.  Using the supplied Makefile, I've built and tested it
 myself for x86-linux and amd64-linux.  With makefile.msc, Visual C++
 6.0 and nmake, you can build a native Win32 version too.  Large file
diff --git a/README.XML.STUFF b/README.XML.STUFF
index 1a5b4c5..3a57f3f 100644
--- a/README.XML.STUFF
+++ b/README.XML.STUFF
@@ -2,8 +2,8 @@
   This file is part of bzip2/libbzip2, a program and library for
   lossless, block-sorting data compression.
 
-  bzip2/libbzip2 version 1.0.5 of 10 December 2007
-  Copyright (C) 1996-2007 Julian Seward <jseward@bzip.org>
+  bzip2/libbzip2 version 1.0.6 of 6 September 2010
+  Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
 
   Please read the WARNING, DISCLAIMER and PATENTS sections in the 
   README file.
diff --git a/blocksort.c b/blocksort.c
index bd2dec1..d0d662c 100644
--- a/blocksort.c
+++ b/blocksort.c
@@ -8,8 +8,8 @@
    This file is part of bzip2/libbzip2, a program and library for
    lossless, block-sorting data compression.
 
-   bzip2/libbzip2 version 1.0.5 of 10 December 2007
-   Copyright (C) 1996-2007 Julian Seward <jseward@bzip.org>
+   bzip2/libbzip2 version 1.0.6 of 6 September 2010
+   Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
 
    Please read the WARNING, DISCLAIMER and PATENTS sections in the 
    README file.
diff --git a/bzip2.1 b/bzip2.1
index a313f2d..ce3a78e 100644
--- a/bzip2.1
+++ b/bzip2.1
@@ -1,7 +1,7 @@
 .PU
 .TH bzip2 1
 .SH NAME
-bzip2, bunzip2 \- a block-sorting file compressor, v1.0.4
+bzip2, bunzip2 \- a block-sorting file compressor, v1.0.6
 .br
 bzcat \- decompresses files to stdout
 .br
@@ -405,11 +405,11 @@
 tries hard to detect I/O errors and exit cleanly, but the details of
 what the problem is sometimes seem rather misleading.
 
-This manual page pertains to version 1.0.4 of
+This manual page pertains to version 1.0.6 of
 .I bzip2.  
 Compressed data created by this version is entirely forwards and
 backwards compatible with the previous public releases, versions
-0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1, 1.0.2 and 1.0.3, but with the following
+0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1, 1.0.2 and above, but with the following
 exception: 0.9.0 and above can correctly decompress multiple
 concatenated compressed files.  0.1pl2 cannot do this; it will stop
 after decompressing just the first file in the stream.
diff --git a/bzip2.1.preformatted b/bzip2.1.preformatted
index 15e16e5..63c33be 100644
--- a/bzip2.1.preformatted
+++ b/bzip2.1.preformatted
@@ -3,7 +3,7 @@
 
 
 NNAAMMEE
-       bzip2, bunzip2 − a block‐sorting file compressor, v1.0.4
+       bzip2, bunzip2 − a block‐sorting file compressor, v1.0.6
        bzcat − decompresses files to stdout
        bzip2recover − recovers data from damaged bzip2 files
 
@@ -348,11 +348,11 @@
        but  the  details  of  what  the problem is sometimes seem
        rather misleading.
 
-       This manual page pertains to version 1.0.4 of _b_z_i_p_2_.  Com­
+       This manual page pertains to version 1.0.6 of _b_z_i_p_2_.  Com­
        pressed  data created by this version is entirely forwards
        and  backwards  compatible  with   the   previous   public
        releases,  versions  0.1pl2,  0.9.0,  0.9.5, 1.0.0, 1.0.1, 
-       1.0.2 and 1.0.3, but with the  following  exception: 0.9.0
+       1.0.2 and above, but with the  following  exception: 0.9.0
        and above can  correctly decompress  multiple concatenated
        compressed files.  0.1pl2  cannot do this;  it  will  stop 
        after  decompressing just the first file in the stream.
diff --git a/bzip2.c b/bzip2.c
index 3904107..6de9d1d 100644
--- a/bzip2.c
+++ b/bzip2.c
@@ -7,8 +7,8 @@
    This file is part of bzip2/libbzip2, a program and library for
    lossless, block-sorting data compression.
 
-   bzip2/libbzip2 version 1.0.5 of 10 December 2007
-   Copyright (C) 1996-2007 Julian Seward <jseward@bzip.org>
+   bzip2/libbzip2 version 1.0.6 of 6 September 2010
+   Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
 
    Please read the WARNING, DISCLAIMER and PATENTS sections in the 
    README file.
@@ -1605,11 +1605,11 @@
     "bzip2, a block-sorting file compressor.  "
     "Version %s.\n"
     "   \n"
-    "   Copyright (C) 1996-2007 by Julian Seward.\n"
+    "   Copyright (C) 1996-2010 by Julian Seward.\n"
     "   \n"
     "   This program is free software; you can redistribute it and/or modify\n"
     "   it under the terms set out in the LICENSE file, which is included\n"
-    "   in the bzip2-1.0.5 source distribution.\n"
+    "   in the bzip2-1.0.6 source distribution.\n"
     "   \n"
     "   This program is distributed in the hope that it will be useful,\n"
     "   but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
diff --git a/bzip2.txt b/bzip2.txt
index 4fb9c74..d2deb39 100644
--- a/bzip2.txt
+++ b/bzip2.txt
@@ -1,6 +1,6 @@
 
 NAME
-       bzip2, bunzip2 - a block-sorting file compressor, v1.0.4
+       bzip2, bunzip2 - a block-sorting file compressor, v1.0.6
        bzcat - decompresses files to stdout
        bzip2recover - recovers data from damaged bzip2 files
 
@@ -345,11 +345,11 @@
        but  the  details  of  what  the problem is sometimes seem
        rather misleading.
 
-       This manual page pertains to version 1.0.4 of bzip2.  Com-
+       This manual page pertains to version 1.0.6 of bzip2.  Com-
        pressed  data created by this version is entirely forwards
        and  backwards  compatible  with   the   previous   public
        releases,  versions  0.1pl2,  0.9.0,  0.9.5, 1.0.0, 1.0.1,
-       1.0.2 and 1.0.3, but with the  following  exception: 0.9.0
+       1.0.2 and above, but with the  following  exception: 0.9.0
        and above can  correctly decompress  multiple concatenated
        compressed files.  0.1pl2  cannot do this;  it  will  stop
        after  decompressing just the first file in the stream.
diff --git a/bzip2recover.c b/bzip2recover.c
index 5f6d621..f9de049 100644
--- a/bzip2recover.c
+++ b/bzip2recover.c
@@ -7,8 +7,8 @@
    This file is part of bzip2/libbzip2, a program and library for
    lossless, block-sorting data compression.
 
-   bzip2/libbzip2 version 1.0.5 of 10 December 2007
-   Copyright (C) 1996-2007 Julian Seward <jseward@bzip.org>
+   bzip2/libbzip2 version 1.0.6 of 6 September 2010
+   Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
 
    Please read the WARNING, DISCLAIMER and PATENTS sections in the 
    README file.
@@ -313,7 +313,7 @@
    inFileName[0] = outFileName[0] = 0;
 
    fprintf ( stderr, 
-             "bzip2recover 1.0.5: extracts blocks from damaged .bz2 files.\n" );
+             "bzip2recover 1.0.6: extracts blocks from damaged .bz2 files.\n" );
 
    if (argc != 2) {
       fprintf ( stderr, "%s: usage is `%s damaged_file_name'.\n",
diff --git a/bzlib.c b/bzlib.c
index ef86c91..bd358a7 100644
--- a/bzlib.c
+++ b/bzlib.c
@@ -8,8 +8,8 @@
    This file is part of bzip2/libbzip2, a program and library for
    lossless, block-sorting data compression.
 
-   bzip2/libbzip2 version 1.0.5 of 10 December 2007
-   Copyright (C) 1996-2007 Julian Seward <jseward@bzip.org>
+   bzip2/libbzip2 version 1.0.6 of 6 September 2010
+   Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
 
    Please read the WARNING, DISCLAIMER and PATENTS sections in the 
    README file.
diff --git a/bzlib.h b/bzlib.h
index c5b75d6..8277123 100644
--- a/bzlib.h
+++ b/bzlib.h
@@ -8,8 +8,8 @@
    This file is part of bzip2/libbzip2, a program and library for
    lossless, block-sorting data compression.
 
-   bzip2/libbzip2 version 1.0.5 of 10 December 2007
-   Copyright (C) 1996-2007 Julian Seward <jseward@bzip.org>
+   bzip2/libbzip2 version 1.0.6 of 6 September 2010
+   Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
 
    Please read the WARNING, DISCLAIMER and PATENTS sections in the 
    README file.
diff --git a/bzlib_private.h b/bzlib_private.h
index 2342787..5d0217f 100644
--- a/bzlib_private.h
+++ b/bzlib_private.h
@@ -8,8 +8,8 @@
    This file is part of bzip2/libbzip2, a program and library for
    lossless, block-sorting data compression.
 
-   bzip2/libbzip2 version 1.0.5 of 10 December 2007
-   Copyright (C) 1996-2007 Julian Seward <jseward@bzip.org>
+   bzip2/libbzip2 version 1.0.6 of 6 September 2010
+   Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
 
    Please read the WARNING, DISCLAIMER and PATENTS sections in the 
    README file.
@@ -36,7 +36,7 @@
 
 /*-- General stuff. --*/
 
-#define BZ_VERSION  "1.0.5, 10-Dec-2007"
+#define BZ_VERSION  "1.0.6, 6-Sept-2010"
 
 typedef char            Char;
 typedef unsigned char   Bool;
diff --git a/compress.c b/compress.c
index 8c80a07..caf7696 100644
--- a/compress.c
+++ b/compress.c
@@ -8,8 +8,8 @@
    This file is part of bzip2/libbzip2, a program and library for
    lossless, block-sorting data compression.
 
-   bzip2/libbzip2 version 1.0.5 of 10 December 2007
-   Copyright (C) 1996-2007 Julian Seward <jseward@bzip.org>
+   bzip2/libbzip2 version 1.0.6 of 6 September 2010
+   Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
 
    Please read the WARNING, DISCLAIMER and PATENTS sections in the 
    README file.
diff --git a/crctable.c b/crctable.c
index 215687b..1fea7e9 100644
--- a/crctable.c
+++ b/crctable.c
@@ -8,8 +8,8 @@
    This file is part of bzip2/libbzip2, a program and library for
    lossless, block-sorting data compression.
 
-   bzip2/libbzip2 version 1.0.5 of 10 December 2007
-   Copyright (C) 1996-2007 Julian Seward <jseward@bzip.org>
+   bzip2/libbzip2 version 1.0.6 of 6 September 2010
+   Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
 
    Please read the WARNING, DISCLAIMER and PATENTS sections in the 
    README file.
diff --git a/decompress.c b/decompress.c
index bba5e0f..311f566 100644
--- a/decompress.c
+++ b/decompress.c
@@ -8,8 +8,8 @@
    This file is part of bzip2/libbzip2, a program and library for
    lossless, block-sorting data compression.
 
-   bzip2/libbzip2 version 1.0.5 of 10 December 2007
-   Copyright (C) 1996-2007 Julian Seward <jseward@bzip.org>
+   bzip2/libbzip2 version 1.0.6 of 6 September 2010
+   Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
 
    Please read the WARNING, DISCLAIMER and PATENTS sections in the 
    README file.
@@ -381,6 +381,13 @@
             es = -1;
             N = 1;
             do {
+               /* Check that N doesn't get too big, so that es doesn't
+                  go negative.  The maximum value that can be
+                  RUNA/RUNB encoded is equal to the block size (post
+                  the initial RLE), viz, 900k, so bounding N at 2
+                  million should guard against overflow without
+                  rejecting any legitimate inputs. */
+               if (N >= 2*1024*1024) RETURN(BZ_DATA_ERROR);
                if (nextSym == BZ_RUNA) es = es + (0+1) * N; else
                if (nextSym == BZ_RUNB) es = es + (1+1) * N;
                N = N * 2;
@@ -485,15 +492,28 @@
          RETURN(BZ_DATA_ERROR);
 
       /*-- Set up cftab to facilitate generation of T^(-1) --*/
+      /* Check: unzftab entries in range. */
+      for (i = 0; i <= 255; i++) {
+         if (s->unzftab[i] < 0 || s->unzftab[i] > nblock)
+            RETURN(BZ_DATA_ERROR);
+      }
+      /* Actually generate cftab. */
       s->cftab[0] = 0;
       for (i = 1; i <= 256; i++) s->cftab[i] = s->unzftab[i-1];
       for (i = 1; i <= 256; i++) s->cftab[i] += s->cftab[i-1];
+      /* Check: cftab entries in range. */
       for (i = 0; i <= 256; i++) {
          if (s->cftab[i] < 0 || s->cftab[i] > nblock) {
             /* s->cftab[i] can legitimately be == nblock */
             RETURN(BZ_DATA_ERROR);
          }
       }
+      /* Check: cftab entries non-descending. */
+      for (i = 1; i <= 256; i++) {
+         if (s->cftab[i-1] > s->cftab[i]) {
+            RETURN(BZ_DATA_ERROR);
+         }
+      }
 
       s->state_out_len = 0;
       s->state_out_ch  = 0;
diff --git a/entities.xml b/entities.xml
index e9e0553..4b28f34 100644
--- a/entities.xml
+++ b/entities.xml
@@ -1,9 +1,9 @@
 <!-- misc. strings -->
 <!ENTITY bz-url "http://www.bzip.org">
 <!ENTITY bz-email "jseward@bzip.org">
-<!ENTITY bz-lifespan "1996-2007">
+<!ENTITY bz-lifespan "1996-2010">
 
-<!ENTITY bz-version "1.0.5">
-<!ENTITY bz-date "10 December 2007">
+<!ENTITY bz-version "1.0.6">
+<!ENTITY bz-date "6 September 2010">
 
 <!ENTITY manual-title "bzip2 Manual">
diff --git a/format.pl b/format.pl
index 1928d15..f169fd9 100755
--- a/format.pl
+++ b/format.pl
@@ -4,8 +4,8 @@
 # This file is part of bzip2/libbzip2, a program and library for
 # lossless, block-sorting data compression.
 #
-# bzip2/libbzip2 version 1.0.5 of 10 December 2007
-# Copyright (C) 1996-2007 Julian Seward <jseward@bzip.org>
+# bzip2/libbzip2 version 1.0.6 of 6 September 2010
+# Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
 #
 # Please read the WARNING, DISCLAIMER and PATENTS sections in the 
 # README file.
diff --git a/huffman.c b/huffman.c
index 87e79e3..2283fdb 100644
--- a/huffman.c
+++ b/huffman.c
@@ -8,8 +8,8 @@
    This file is part of bzip2/libbzip2, a program and library for
    lossless, block-sorting data compression.
 
-   bzip2/libbzip2 version 1.0.5 of 10 December 2007
-   Copyright (C) 1996-2007 Julian Seward <jseward@bzip.org>
+   bzip2/libbzip2 version 1.0.6 of 6 September 2010
+   Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
 
    Please read the WARNING, DISCLAIMER and PATENTS sections in the 
    README file.
diff --git a/manual.xml b/manual.xml
index f224136..a7fbcb3 100644
--- a/manual.xml
+++ b/manual.xml
@@ -9,7 +9,7 @@
 <book lang="en" id="userman" xreflabel="bzip2 Manual">
 
  <bookinfo>
-  <title>bzip2 and libbzip2, version 1.0.5</title>
+  <title>bzip2 and libbzip2, version 1.0.6</title>
   <subtitle>A program and library for data compression</subtitle>
   <copyright>
    <year>&bz-lifespan;</year>
@@ -139,7 +139,7 @@
 
  <listitem><para><computeroutput>bzip2</computeroutput>,
   <computeroutput>bunzip2</computeroutput> - a block-sorting file
-  compressor, v1.0.4</para></listitem>
+  compressor, v1.0.6</para></listitem>
 
  <listitem><para><computeroutput>bzcat</computeroutput> -
    decompresses files to stdout</para></listitem>
@@ -1033,7 +1033,7 @@
 
 
 <sect2 id="bzcompress-init" xreflabel="BZ2_bzCompressInit">
-<title><computeroutput>BZ2_bzCompressInit</computeroutput></title>
+<title>BZ2_bzCompressInit</title>
 
 <programlisting>
 typedef struct {
@@ -1183,7 +1183,7 @@
 
 
 <sect2 id="bzCompress" xreflabel="BZ2_bzCompress">
-<title><computeroutput>BZ2_bzCompress</computeroutput></title>
+<title>BZ2_bzCompress</title>
 
 <programlisting>
 int BZ2_bzCompress ( bz_stream *strm, int action );
@@ -1408,7 +1408,7 @@
 
 
 <sect2 id="bzCompress-end" xreflabel="BZ2_bzCompressEnd">
-<title><computeroutput>BZ2_bzCompressEnd</computeroutput></title>
+<title>BZ2_bzCompressEnd</title>
 
 <programlisting>
 int BZ2_bzCompressEnd ( bz_stream *strm );
@@ -1428,7 +1428,7 @@
 
 
 <sect2 id="bzDecompress-init" xreflabel="BZ2_bzDecompressInit">
-<title><computeroutput>BZ2_bzDecompressInit</computeroutput></title>
+<title>BZ2_bzDecompressInit</title>
 
 <programlisting>
 int BZ2_bzDecompressInit ( bz_stream *strm, int verbosity, int small );
@@ -1492,7 +1492,7 @@
 
 
 <sect2 id="bzDecompress" xreflabel="BZ2_bzDecompress">
-<title><computeroutput>BZ2_bzDecompress</computeroutput></title>
+<title>BZ2_bzDecompress</title>
 
 <programlisting>
 int BZ2_bzDecompress ( bz_stream *strm );
@@ -1587,7 +1587,7 @@
 
 
 <sect2 id="bzDecompress-end" xreflabel="BZ2_bzDecompressEnd">
-<title><computeroutput>BZ2_bzDecompressEnd</computeroutput></title>
+<title>BZ2_bzDecompressEnd</title>
 
 <programlisting>
 int BZ2_bzDecompressEnd ( bz_stream *strm );
@@ -1682,7 +1682,7 @@
 
 
 <sect2 id="bzreadopen" xreflabel="BZ2_bzReadOpen">
-<title><computeroutput>BZ2_bzReadOpen</computeroutput></title>
+<title>BZ2_bzReadOpen</title>
 
 <programlisting>
 typedef void BZFILE;
@@ -1765,7 +1765,7 @@
 
 
 <sect2 id="bzread" xreflabel="BZ2_bzRead">
-<title><computeroutput>BZ2_bzRead</computeroutput></title>
+<title>BZ2_bzRead</title>
 
 <programlisting>
 int BZ2_bzRead ( int *bzerror, BZFILE *b, void *buf, int len );
@@ -1859,7 +1859,7 @@
 
 
 <sect2 id="bzreadgetunused" xreflabel="BZ2_bzReadGetUnused">
-<title><computeroutput>BZ2_bzReadGetUnused</computeroutput></title>
+<title>BZ2_bzReadGetUnused</title>
 
 <programlisting>
 void BZ2_bzReadGetUnused( int* bzerror, BZFILE *b, 
@@ -1903,7 +1903,7 @@
 
 
 <sect2 id="bzreadclose" xreflabel="BZ2_bzReadClose">
-<title><computeroutput>BZ2_bzReadClose</computeroutput></title>
+<title>BZ2_bzReadClose</title>
 
 <programlisting>
 void BZ2_bzReadClose ( int *bzerror, BZFILE *b );
@@ -1937,7 +1937,7 @@
 
 
 <sect2 id="bzwriteopen" xreflabel="BZ2_bzWriteOpen">
-<title><computeroutput>BZ2_bzWriteOpen</computeroutput></title>
+<title>BZ2_bzWriteOpen</title>
 
 <programlisting>
 BZFILE *BZ2_bzWriteOpen( int *bzerror, FILE *f, 
@@ -2003,7 +2003,7 @@
 
 
 <sect2 id="bzwrite" xreflabel="BZ2_bzWrite">
-<title><computeroutput>BZ2_bzWrite</computeroutput></title>
+<title>BZ2_bzWrite</title>
 
 <programlisting>
 void BZ2_bzWrite ( int *bzerror, BZFILE *b, void *buf, int len );
@@ -2031,7 +2031,7 @@
 
 
 <sect2 id="bzwriteclose" xreflabel="BZ2_bzWriteClose">
-<title><computeroutput>BZ2_bzWriteClose</computeroutput></title>
+<title>BZ2_bzWriteClose</title>
 
 <programlisting>
 void BZ2_bzWriteClose( int *bzerror, BZFILE* f,
@@ -2235,7 +2235,7 @@
 
 
 <sect2 id="bzbufftobuffcompress" xreflabel="BZ2_bzBuffToBuffCompress">
-<title><computeroutput>BZ2_bzBuffToBuffCompress</computeroutput></title>
+<title>BZ2_bzBuffToBuffCompress</title>
 
 <programlisting>
 int BZ2_bzBuffToBuffCompress( char*         dest,
@@ -2302,7 +2302,7 @@
 
 
 <sect2 id="bzbufftobuffdecompress" xreflabel="BZ2_bzBuffToBuffDecompress">
-<title><computeroutput>BZ2_bzBuffToBuffDecompress</computeroutput></title>
+<title>BZ2_bzBuffToBuffDecompress</title>
 
 <programlisting>
 int BZ2_bzBuffToBuffDecompress( char*         dest,
@@ -2377,7 +2377,7 @@
 
 
 <sect1 id="zlib-compat" xreflabel="zlib compatibility functions">
-<title><computeroutput>zlib</computeroutput> compatibility functions</title>
+<title>zlib compatibility functions</title>
 
 <para>Yoshioka Tsuneo has contributed some functions to give
 better <computeroutput>zlib</computeroutput> compatibility.
@@ -2444,11 +2444,11 @@
 
 <sect1 id="stdio-free" 
        xreflabel="Using the library in a stdio-free environment">
-<title>Using the library in a <computeroutput>stdio</computeroutput>-free environment</title>
+<title>Using the library in a stdio-free environment</title>
 
 
 <sect2 id="stdio-bye" xreflabel="Getting rid of stdio">
-<title>Getting rid of <computeroutput>stdio</computeroutput></title>
+<title>Getting rid of stdio</title>
 
 <para>In a deeply embedded application, you might want to use
 just the memory-to-memory functions.  You can do this
diff --git a/mk251.c b/mk251.c
index 39e94c0..c9c36f6 100644
--- a/mk251.c
+++ b/mk251.c
@@ -9,8 +9,8 @@
    This file is part of bzip2/libbzip2, a program and library for
    lossless, block-sorting data compression.
 
-   bzip2/libbzip2 version 1.0.5 of 10 December 2007
-   Copyright (C) 1996-2007 Julian Seward <jseward@bzip.org>
+   bzip2/libbzip2 version 1.0.6 of 6 September 2010
+   Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
 
    Please read the WARNING, DISCLAIMER and PATENTS sections in the 
    README file.
diff --git a/randtable.c b/randtable.c
index 068b763..6d62459 100644
--- a/randtable.c
+++ b/randtable.c
@@ -8,8 +8,8 @@
    This file is part of bzip2/libbzip2, a program and library for
    lossless, block-sorting data compression.
 
-   bzip2/libbzip2 version 1.0.5 of 10 December 2007
-   Copyright (C) 1996-2007 Julian Seward <jseward@bzip.org>
+   bzip2/libbzip2 version 1.0.6 of 6 September 2010
+   Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
 
    Please read the WARNING, DISCLAIMER and PATENTS sections in the 
    README file.
diff --git a/spewG.c b/spewG.c
index 5892b92..14a3649 100644
--- a/spewG.c
+++ b/spewG.c
@@ -13,8 +13,8 @@
    This file is part of bzip2/libbzip2, a program and library for
    lossless, block-sorting data compression.
 
-   bzip2/libbzip2 version 1.0.5 of 10 December 2007
-   Copyright (C) 1996-2007 Julian Seward <jseward@bzip.org>
+   bzip2/libbzip2 version 1.0.6 of 6 September 2010
+   Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
 
    Please read the WARNING, DISCLAIMER and PATENTS sections in the 
    README file.
diff --git a/unzcrash.c b/unzcrash.c
index a1b7546..7041da5 100644
--- a/unzcrash.c
+++ b/unzcrash.c
@@ -17,8 +17,8 @@
    This file is part of bzip2/libbzip2, a program and library for
    lossless, block-sorting data compression.
 
-   bzip2/libbzip2 version 1.0.5 of 10 December 2007
-   Copyright (C) 1996-2007 Julian Seward <jseward@bzip.org>
+   bzip2/libbzip2 version 1.0.6 of 6 September 2010
+   Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
 
    Please read the WARNING, DISCLAIMER and PATENTS sections in the 
    README file.
diff --git a/xmlproc.sh b/xmlproc.sh
index 5384177..ca284ea 100755
--- a/xmlproc.sh
+++ b/xmlproc.sh
@@ -5,8 +5,8 @@
 #  This file is part of bzip2/libbzip2, a program and library for
 #  lossless, block-sorting data compression.
 #
-#  bzip2/libbzip2 version 1.0.5 of 10 December 2007
-#  Copyright (C) 1996-2007 Julian Seward <jseward@bzip.org>
+#  bzip2/libbzip2 version 1.0.6 of 6 September 2010
+#  Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
 #
 #  Please read the WARNING, DISCLAIMER and PATENTS sections in the 
 #  README file.