summaryrefslogtreecommitdiff
path: root/libarchive/archive_write_set_format_iso9660.c
Commit message (Collapse)AuthorAgeFilesLines
* Make single bit bitfields unsigned to avoid clang 16 warning (#1860)Dimitry Andric2023-04-171-7/+7
| | | | | | | | | | | | | | | | | Clang 16 introduced a warning about single bit bitfields in structs, which is triggered by a few libarchive formats: libarchive/archive_write_set_format_7zip.c:1541:13: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] file->dir = 1; ^ ~ This is because single bit bitfields only support values -1 and 0, if they are signed. For bitfields with two or more bits this can be intentional, but single bit bitfields are typically used as booleans, so it is better to make them unsigned.
* replace time64 functions with normal ones (#1830)Rosen Penev2023-01-091-8/+4
| | | | | | | | | Otherwise there are 32/64-bit pointer conversions going on. In Windows since MSVC2005, time_t has been 64-bit. MinGW needs a hack to get 64-bit time_t. Signed-off-by: Rosen Penev <rosenp@gmail.com> Signed-off-by: Rosen Penev <rosenp@gmail.com>
* cleanup _localtime64_s (#1820)Rosen Penev2022-12-201-6/+6
| | | Signed-off-by: Rosen Penev <rosenp@gmail.com>
* windows: make sure we use the right calling convention for libcDustin Howett2021-11-201-0/+2
|
* Fill in Unknown for the system identifier if there is no utsname and not Windowsuyjulian2020-07-081-1/+2
|
* Fix use after free in ISO9660 and XAR writerMartin Matuska2020-02-011-5/+3
| | | | | | | Remove rbtree nodes before freeing them. For better code readability import new rbtree macros from NetBSD. Fixes #1325
* Multiple code fixes and optimizationsMartin Matuska2020-01-141-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | archive_read_support_format_rar5.c: Bitfield int -> signed int Archive_write_set_format_iso9660.c: Bitfield int -> signed int archive_write_set_format_xar.c: Bitfield int -> signed int archive_write_set_format_7zip.c: Bitfield int -> signed int archive_read_support_format_xar.c Remove useless comparsion archive_read_support_format_rar.c: Fix invalid nested loop break. Comment out dead code sections. Simplify size comparsions of lensymbol and offsymbol. archive_read_support_filter_uu.c: Remove useless comparsions archive_read_disk_posix.c: Remove useless do-while-zero Found by LGTM.com code analysis
* Correct some typographical and grammatical errors.Peter Pentchev2019-09-211-3/+3
|
* Fix a few obvious resource leaks and strcpy() misusesPavel Raiskup2018-11-231-2/+2
| | | | Per Coverity report.
* Avoid using C99 declaration-after-statement syntaxBrad King2017-02-241-2/+4
| | | | Add a dedicated `{}` block to contain a local variable instead.
* Merge pull request #845 from yaneurabeya/libarchive-coverity-fixesTim Kientzle2017-01-281-1/+1
|\ | | | | Fix coverity issues with libarchive/
| * Clarify that calling memset with '0' is intentional by casting theNgie Cooper2017-01-161-1/+1
| | | | | | | | | | | | | | value to (int) Reported by: Coverity CID: 1017786
* | Correctly convert 32-bit time_t to __time64_tKyrre Sjobak2017-01-261-2/+4
|/
* Spelling fixesGraham Percival2016-12-271-13/+13
| | | | Sponsored by: Tarsnap Backup Inc.
* Spelling fixes (#846)Graham Percival2016-12-201-9/+9
| | | Sponsored by: Tarsnap Backup Inc.
* Spelling fixesGraham Percival2016-12-081-2/+2
| | | | Sponsored by: Tarsnap Backup Inc.
* Fix a couple of typographical errors.Peter Pentchev2016-07-071-1/+1
|
* Issue 711: Be more careful about verifying filename lengths when writing ↵Tim Kientzle2016-05-281-8/+10
| | | | | | | | | | ISO9660 archives * Don't cast size_t to int, since this can lead to overflow on machines where sizeof(int) < sizeof(size_t) * Check a + b > limit by writing it as a > limit || b > limit || a + b > limit to avoid problems when a + b wraps around.
* Avoid trailing `,` in enum for ISO C90 compatiblityBrad King2015-10-261-5/+5
|
* Avoid code analyzer error.Michihiro NAKAJIMA2014-10-051-0/+10
|
* Cast comparison functions to __compar_fn_t if stdlib.h defines it.Andres Mejia2013-02-071-0/+10
|
* Fix build failure with zlib on Win64.Michihiro NAKAJIMA2012-11-071-10/+10
|
* Fix build failure on Win64.Michihiro NAKAJIMA2012-11-071-30/+31
|
* Fix build failure on mingw32 for x86-64.Michihiro NAKAJIMA2012-10-041-11/+11
|
* Fix a possibility of memory leaks when realloc fails.Michihiro NAKAJIMA2012-09-181-3/+4
| | | | | | Do not assign the return value of realloc into the variable that has the original pointer because if realloc failed we will lose the chance to release the address.
* Rename some internal functions as other related functions.Michihiro NAKAJIMA2012-03-171-2/+2
| | | | | | archive_strcpy_in_locale ==> archive_strcpy_l archive_strncpy_in_locale ==> archive_strncpy_l archive_strncat_in_locale ==> archive_strncat_l
* Fix a comparison of file names in ISO images.Michihiro NAKAJIMA2012-02-261-2/+2
|
* On Visual Studio, Enable Warning 4244: 'conversion' conversion from 'type1'Michihiro NAKAJIMA2012-02-191-35/+37
| | | | to 'type2', possible lose of data.
* Fix issue 237.Michihiro NAKAJIMA2012-02-141-1/+6
| | | | Properly set a clear error message when archive_{write,read}_set_options failed.
* Fix build failure in aggressive warningsMichihiro NAKAJIMA2012-02-101-6/+5
|
* Fix build failure with -Wshadow GCC option since it happend on FreeBSD current.Michihiro NAKAJIMA2012-02-091-2/+1
|
* When ENOMEM happened in archive_string_append_from_wcs and ↵Michihiro NAKAJIMA2012-01-231-4/+21
| | | | | | | | | | archive_string_append_from_mbs, those function should report the error to the caller instead of invoking __archive_errx(). We should report that ENOMEM error as possible as we can and we still need to further improve reporting ENOEM. SVN-Revision: 4193
* Rename isoent_rr_move_dir parameter isoent => curentBrad King2012-01-111-21/+21
| | | | | | | The PGI compiler confuses parameter name "isoent" with "struct isoent". Rename the parameter to "curent" to avoid confusion. SVN-Revision: 4136
* Replace integer constant LL suffix with cast to int64_tBrad King2012-01-111-1/+1
| | | | | | The LL suffix is not portable. Use an explicit cast instead. SVN-Revision: 4127
* Spelling fixes from Ulrich Spoerlein.Tim Kientzle2012-01-071-4/+4
| | | | SVN-Revision: 4092
* Fix spelling error.Andres Mejia2011-12-241-1/+1
| | | | SVN-Revision: 3993
* Update comments.Michihiro NAKAJIMA2011-11-161-8/+10
| | | | SVN-Revision: 3795
* Set explicit unused arguments in order to avoid several warnings about it, ↵Michihiro NAKAJIMA2011-09-141-0/+1
| | | | | | which some C compiler complain about. SVN-Revision: 3710
* Issue 177: Fix --without-zlib compilation.Michihiro NAKAJIMA2011-09-011-0/+6
| | | | SVN-Revision: 3667
* In iso9660 writer and xar writer, always overwrite the existing file in the ↵Michihiro NAKAJIMA2011-07-141-7/+6
| | | | | | | | | file tree which file has the same name; it is better that front-end applications such as tar decide how they handle that case. SVN-Revision: 3480
* In the ISO writer, ignore ineffective path names in the ISO9660 file systemMichihiro NAKAJIMA2011-07-101-10/+11
| | | | | | such as "." , "/" or "../" and fix that handling. This is to improve r3464 changes. SVN-Revision: 3466
* Ignore a path which looks like the top of directory name, and whose name isMichihiro NAKAJIMA2011-07-091-0/+12
| | | | | | exactly "." which is the same as the root directory name of an ISO image. SVN-Revision: 3464
* Stop trimming parent directories at iso9660 writer; users will decideMichihiro NAKAJIMA2011-07-091-27/+0
| | | | | | how many components are stripped or renaming a part of path names they like. SVN-Revision: 3463
* Do not write odd data whose size is less than 2048 bytes toMichihiro NAKAJIMA2011-07-091-3/+8
| | | | | | the temporary file. SVN-Revision: 3462
* Remove unneeded code.Michihiro NAKAJIMA2011-06-211-3/+1
| | | | SVN-Revision: 3411
* Fix warnings.Michihiro NAKAJIMA2011-06-211-2/+2
| | | | SVN-Revision: 3409
* This is the final step to reduce use of both read() and write() system-calls ↵Michihiro NAKAJIMA2011-06-211-173/+143
| | | | | | | | | in the iso9660 writer. - Stop reading the contents of each file from the temporary file with read(). - Read the block of all file contents instead, and then write it to next stream. SVN-Revision: 3407
* Fix making a bootable iso image with zisofs option.Michihiro NAKAJIMA2011-06-201-64/+122
| | | | SVN-Revision: 3406
* This is second step to reduce use of both read() and write() system-calls in ↵Michihiro NAKAJIMA2011-06-201-56/+168
| | | | | | | | | | | the iso9660 writer. - Copy file contents to wbuff, 64K buffer, and then write wbuff data with write() syscall when the buffer is full. - Improve wbuff handling to be able to be used for zisofs accordingly. - Stop using wbuff as read buffer in setup_boot_information() function. SVN-Revision: 3405
* This is first step to reduce use of both read() and write() system-calls in ↵Michihiro NAKAJIMA2011-06-191-363/+503
| | | | | | | | | | | the iso9660 writer. - Use only one temporary file to be simple structure. - When enabling zisofs, almost all files except a small(<2048 bytes) file are, consequently, always compressed even if it is a boot file. The boot file will be uncompressed later. - Write those files to the temporary file by 2048 bytes, though currently this is no effect. SVN-Revision: 3404