Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/bzip2/dist merge 1.0.6



details:   https://anonhg.NetBSD.org/src/rev/c23b58a84223
branches:  trunk
changeset: 779156:c23b58a84223
user:      wiz <wiz%NetBSD.org@localhost>
date:      Mon May 07 00:45:47 2012 +0000

description:
merge 1.0.6

diffstat:

 external/bsd/bzip2/dist/bzip2.1         |   6 +++---
 external/bsd/bzip2/dist/bzip2.c         |  10 +++++-----
 external/bsd/bzip2/dist/bzip2recover.c  |   9 ++++-----
 external/bsd/bzip2/dist/bzlib.c         |   6 +++---
 external/bsd/bzip2/dist/bzlib_private.h |   8 ++++----
 external/bsd/bzip2/dist/decompress.c    |  19 ++++++++++++++++---
 6 files changed, 35 insertions(+), 23 deletions(-)

diffs (185 lines):

diff -r 6ea081ef54e5 -r c23b58a84223 external/bsd/bzip2/dist/bzip2.1
--- a/external/bsd/bzip2/dist/bzip2.1   Mon May 07 00:41:32 2012 +0000
+++ b/external/bsd/bzip2/dist/bzip2.1   Mon May 07 00:45:47 2012 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: bzip2.1,v 1.2 2012/05/07 00:30:05 wiz Exp $
+.\"    $NetBSD: bzip2.1,v 1.3 2012/05/07 00:45:47 wiz Exp $
 .\"
 .Dd May 14, 2010
 .Dt BZIP2 1
@@ -487,11 +487,11 @@
 tries hard to detect I/O errors and exit cleanly, but the details of
 what the problem is sometimes seem rather misleading.
 .Pp
-This manual page pertains to version 1.0.5 of
+This manual page pertains to version 1.0.6 of
 .Nm 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
+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
diff -r 6ea081ef54e5 -r c23b58a84223 external/bsd/bzip2/dist/bzip2.c
--- a/external/bsd/bzip2/dist/bzip2.c   Mon May 07 00:41:32 2012 +0000
+++ b/external/bsd/bzip2/dist/bzip2.c   Mon May 07 00:45:47 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bzip2.c,v 1.2 2012/05/07 00:30:05 wiz Exp $    */
+/*     $NetBSD: bzip2.c,v 1.3 2012/05/07 00:45:47 wiz Exp $    */
 
 
 /*-----------------------------------------------------------*/
@@ -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@localhost>
+   bzip2/libbzip2 version 1.0.6 of 6 September 2010
+   Copyright (C) 1996-2010 Julian Seward <jseward%bzip.org@localhost>
 
    Please read the WARNING, DISCLAIMER and PATENTS sections in the 
    README file.
@@ -1610,11 +1610,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 -r 6ea081ef54e5 -r c23b58a84223 external/bsd/bzip2/dist/bzip2recover.c
--- a/external/bsd/bzip2/dist/bzip2recover.c    Mon May 07 00:41:32 2012 +0000
+++ b/external/bsd/bzip2/dist/bzip2recover.c    Mon May 07 00:45:47 2012 +0000
@@ -1,5 +1,4 @@
-/*     $NetBSD: bzip2recover.c,v 1.2 2012/05/07 00:30:05 wiz Exp $     */
-
+/*     $NetBSD: bzip2recover.c,v 1.3 2012/05/07 00:45:47 wiz Exp $     */
 
 /*-----------------------------------------------------------*/
 /*--- Block recoverer program for bzip2                   ---*/
@@ -10,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@localhost>
+   bzip2/libbzip2 version 1.0.6 of 6 September 2010
+   Copyright (C) 1996-2010 Julian Seward <jseward%bzip.org@localhost>
 
    Please read the WARNING, DISCLAIMER and PATENTS sections in the 
    README file.
@@ -329,7 +328,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 -r 6ea081ef54e5 -r c23b58a84223 external/bsd/bzip2/dist/bzlib.c
--- a/external/bsd/bzip2/dist/bzlib.c   Mon May 07 00:41:32 2012 +0000
+++ b/external/bsd/bzip2/dist/bzlib.c   Mon May 07 00:45:47 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bzlib.c,v 1.2 2012/05/07 00:30:05 wiz Exp $    */
+/*     $NetBSD: bzlib.c,v 1.3 2012/05/07 00:45:47 wiz Exp $    */
 
 
 /*-------------------------------------------------------------*/
@@ -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@localhost>
+   bzip2/libbzip2 version 1.0.6 of 6 September 2010
+   Copyright (C) 1996-2010 Julian Seward <jseward%bzip.org@localhost>
 
    Please read the WARNING, DISCLAIMER and PATENTS sections in the 
    README file.
diff -r 6ea081ef54e5 -r c23b58a84223 external/bsd/bzip2/dist/bzlib_private.h
--- a/external/bsd/bzip2/dist/bzlib_private.h   Mon May 07 00:41:32 2012 +0000
+++ b/external/bsd/bzip2/dist/bzlib_private.h   Mon May 07 00:45:47 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bzlib_private.h,v 1.2 2012/05/07 00:30:05 wiz Exp $    */
+/*     $NetBSD: bzlib_private.h,v 1.3 2012/05/07 00:45:47 wiz Exp $    */
 
 
 /*-------------------------------------------------------------*/
@@ -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@localhost>
+   bzip2/libbzip2 version 1.0.6 of 6 September 2010
+   Copyright (C) 1996-2010 Julian Seward <jseward%bzip.org@localhost>
 
    Please read the WARNING, DISCLAIMER and PATENTS sections in the 
    README file.
@@ -38,7 +38,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 -r 6ea081ef54e5 -r c23b58a84223 external/bsd/bzip2/dist/decompress.c
--- a/external/bsd/bzip2/dist/decompress.c      Mon May 07 00:41:32 2012 +0000
+++ b/external/bsd/bzip2/dist/decompress.c      Mon May 07 00:45:47 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: decompress.c,v 1.2 2012/05/07 00:30:05 wiz Exp $       */
+/*     $NetBSD: decompress.c,v 1.3 2012/05/07 00:45:48 wiz Exp $       */
 
 
 /*-------------------------------------------------------------*/
@@ -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@localhost>
+   bzip2/libbzip2 version 1.0.6 of 6 September 2010
+   Copyright (C) 1996-2010 Julian Seward <jseward%bzip.org@localhost>
 
    Please read the WARNING, DISCLAIMER and PATENTS sections in the 
    README file.
@@ -494,15 +494,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;



Home | Main Index | Thread Index | Old Index