archive_util.c (328827) | archive_util.c (348607) |
---|---|
1/*- 2 * Copyright (c) 2009-2012,2014 Michihiro NAKAJIMA 3 * Copyright (c) 2003-2007 Tim Kientzle 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 11 unchanged lines hidden (view full) --- 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27#include "archive_platform.h" | 1/*- 2 * Copyright (c) 2009-2012,2014 Michihiro NAKAJIMA 3 * Copyright (c) 2003-2007 Tim Kientzle 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 11 unchanged lines hidden (view full) --- 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27#include "archive_platform.h" |
28__FBSDID("$FreeBSD: stable/11/contrib/libarchive/libarchive/archive_util.c 328827 2018-02-03 02:17:04Z mm $"); | 28__FBSDID("$FreeBSD: stable/11/contrib/libarchive/libarchive/archive_util.c 348607 2019-06-04 10:35:54Z mm $"); |
29 30#ifdef HAVE_SYS_TYPES_H 31#include <sys/types.h> 32#endif 33#ifdef HAVE_ERRNO_H 34#include <errno.h> 35#endif 36#ifdef HAVE_FCNTL_H --- 407 unchanged lines hidden (view full) --- 444 if (get_tempdir(&temp_name) != ARCHIVE_OK) 445 goto exit_tmpfile; 446 } else 447 archive_strcpy(&temp_name, tmpdir); 448 if (temp_name.s[temp_name.length-1] == '/') { 449 temp_name.s[temp_name.length-1] = '\0'; 450 temp_name.length --; 451 } | 29 30#ifdef HAVE_SYS_TYPES_H 31#include <sys/types.h> 32#endif 33#ifdef HAVE_ERRNO_H 34#include <errno.h> 35#endif 36#ifdef HAVE_FCNTL_H --- 407 unchanged lines hidden (view full) --- 444 if (get_tempdir(&temp_name) != ARCHIVE_OK) 445 goto exit_tmpfile; 446 } else 447 archive_strcpy(&temp_name, tmpdir); 448 if (temp_name.s[temp_name.length-1] == '/') { 449 temp_name.s[temp_name.length-1] = '\0'; 450 temp_name.length --; 451 } |
452 if (stat(temp_name.s, &st) < 0) | 452 if (la_stat(temp_name.s, &st) < 0) |
453 goto exit_tmpfile; 454 if (!S_ISDIR(st.st_mode)) { 455 errno = ENOTDIR; 456 goto exit_tmpfile; 457 } 458 archive_strcat(&temp_name, "/libarchive_"); 459 tp = temp_name.s + archive_strlen(&temp_name); 460 archive_strcat(&temp_name, "XXXXXXXXXX"); --- 125 unchanged lines hidden --- | 453 goto exit_tmpfile; 454 if (!S_ISDIR(st.st_mode)) { 455 errno = ENOTDIR; 456 goto exit_tmpfile; 457 } 458 archive_strcat(&temp_name, "/libarchive_"); 459 tp = temp_name.s + archive_strlen(&temp_name); 460 archive_strcat(&temp_name, "XXXXXXXXXX"); --- 125 unchanged lines hidden --- |