aboutsummaryrefslogtreecommitdiff
path: root/bzip2.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Make sure to call isdigit and isspace with unsigned charHEADmasterMark Wielaard2024-04-091-2/+2
| | | | | | | | | Casting to Int32 or int could create negative values. Which isspace and isdigit don't handle. SEI CERT C Coding Standard STR37-C. Resolve by casting to UChar or unsigned char instead of Int32 or int. https://sourceware.org/bugzilla/show_bug.cgi?id=28283
* Define STDERR_FILENO for BZ_LCCWIN32Mark Wielaard2022-04-201-0/+2
| | | | | | | STDERR_FILENO is *nix specific and is not defined under MSVC. So define it using _fileno(stderr). Suggested-by: Dmitry Tsarevich <dimhotepus@gmail.com>
* Don't call unsafe functions from SIGSEGV/SIGBUS signal handler.Mark Wielaard2020-05-171-16/+24
| | | | | | | | | | | | | | | GCC10 -fanalyzer notices that we try to call functions that are not signal safe from our fatal signal handler: bzip2.c: In function ‘mySIGSEGVorSIGBUScatcher’: bzip2.c:819:7: warning: call to ‘fprintf’ from within signal handler [CWE-479] [-Wanalyzer-unsafe-call-within-signal-handler] It also notices we then call showFileNames and cleanupAndFail which also call possibly not signal safe functions. Just write out the error message directly to STDERR and exit without trying to clean up any files.
* Prepare for 1.0.8 release.bzip2-1.0.8Mark Wielaard2019-07-131-3/+3
|
* Replace project contact email with bzip2-devel@sourceware.org.Mark Wielaard2019-07-111-4/+4
| | | | | Keep Julian's email as author information, but redirect general project feedback in the code and manual to the community mailinglist.
* Fix a 'not a normal file' error when compressing large files.Phil Ross2019-07-091-2/+2
| | | | | | | | | | The bzip2 command line would report 'not a normal file' for files of size larger than 2^32 - 1 bytes. Patch bzip2.c to use _stati64 instead of _stat so that a successful result is returned for large files. Resolves https://github.com/philr/bzip2-windows/issues/3.
* Fix include path separatorJoshua Watt2019-07-051-1/+1
| | | | | | | | Changes the include path separator for Windows builds to use "/" instead of "\". Windows has no problems with using a forward slash as a path separator, but using a backslash causes problems when attempting to cross compile for other platforms (for example, when trying to cross compile for MinGW from Linux).
* Prepare for 1.0.7 release.bzip2-1.0.7Mark Wielaard2019-06-271-1/+1
|
* Add prepare-release.sh script.Mark Wielaard2019-06-251-1/+1
| | | | | | | | | | | | | | | | | | | Script to run to prepare a new release. It will update the release number and tell you to update the CHANGES file and to double check everything looks before doing the release commit and tagging. Afterwards you probably want to run release-update.sh to upload the release and update the website at https://sourceware.org/bzip2/ There are embedded version strings and dates in a couple of places. To keep the script simple remove some that aren't absolutely necessary. README now just points to CHANGES. README.COMPILATION.PROBLEMS only mentions the version once at the top. bzip2.c only mentions the version once when doing --version. manual.xml now doesn't have any embedded versions, just uses &bz-version; everywhere.
* bzip2: Fix return value when combining --test,-t and -q.Mark Wielaard2019-06-241-6/+8
| | | | | | | | | | When passing -q to get quiet output --test would not display an error message, but would also suppress the exit 2 code to indicate the file was corrupt. Only suppress the error message with -q, not the exit value. This patch comes from Debian. "bunzip2 -qt returns 0 for corrupt archives" https://bugs.debian.org/279025
* bzip2.c (testStream): Remove set, but not used nread variable.Mark Wielaard2019-06-231-2/+2
| | | | | | | | | | | | | Modern GCC warns: bzip2.c: In function ‘testStream’: bzip2.c:557:37: warning: variable ‘nread’ set but not used [-Wunused-but-set-variable] Int32 bzerr, bzerr_dummy, ret, nread, streamNo, i; ^~~~~ GCC is correct. In testStream we don't care about the number of bytes read by BZ2_bzRead. So just remove the variable and the assignment.
* Change Julian's email address to jseward@acm.orgMark Wielaard2019-03-301-4/+4
|
* bzip2-1.0.6bzip2-1.0.6Julian Seward2010-09-061-4/+4
|
* bzip2-1.0.5bzip2-1.0.5Julian Seward2007-12-101-4/+4
|
* bzip2-1.0.4bzip2-1.0.4Julian Seward2006-12-201-139/+66
|
* bzip2-1.0.3bzip2-1.0.3Julian Seward2005-02-151-8/+12
|
* bzip2-1.0.2bzip2-1.0.2Julian Seward2001-12-301-237/+296
|
* bzip2-1.0.1bzip2-1.0.1Julian Seward2000-06-241-78/+430
|
* bzip2-0.9.5dbzip2-0.9.5dJulian Seward1999-09-041-188/+357
|
* bzip2-0.9.0cbzip2-0.9.0cJulian Seward1998-08-231-2955/+434
|
* bzip2-0.1pl2bzip2-0.1pl2Julian Seward1997-08-291-75/+83
|
* bzip2-0.1bzip2-0.1Julian Seward1997-08-071-0/+4036