mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
Security fixes: #2364 tar: don't crash on truncated tar archives #2366 gzip: prevent a hang when processing a malformed gzip inside a gzip #2377 tar: fix two leaks in tar header parsing Important bugfixes: #2096 rar5: report encrypted entries #2252 7-zip: read/write symlink paths as UTF-8 #2360 tar: fix truncation of entry pathnames in specific archives Obtained from: libarchive Vendor commit: b439d586f53911c84be5e380445a8a259e19114c
47 lines
1.3 KiB
C
47 lines
1.3 KiB
C
/*-
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*
|
|
* Copyright (c) 2003-2007 Tim Kientzle
|
|
* All rights reserved.
|
|
*/
|
|
|
|
/*
|
|
* This header is the first thing included in any of the bsdtar
|
|
* source files. As far as possible, platform-specific issues should
|
|
* be dealt with here and not within individual source files.
|
|
*/
|
|
|
|
#ifndef BSDCAT_PLATFORM_H_INCLUDED
|
|
#define BSDCAT_PLATFORM_H_INCLUDED
|
|
|
|
#if defined(PLATFORM_CONFIG_H)
|
|
/* Use hand-built config.h in environments that need it. */
|
|
#include PLATFORM_CONFIG_H
|
|
#else
|
|
/* Not having a config.h of some sort is a serious problem. */
|
|
#include "config.h"
|
|
#endif
|
|
|
|
#ifdef HAVE_LIBARCHIVE
|
|
/* If we're using the platform libarchive, include system headers. */
|
|
#include <archive.h>
|
|
#include <archive_entry.h>
|
|
#else
|
|
/* Otherwise, include user headers. */
|
|
#include "archive.h"
|
|
#include "archive_entry.h"
|
|
#endif
|
|
|
|
/* How to mark functions that don't return. */
|
|
/* This facilitates use of some newer static code analysis tools. */
|
|
#undef __LA_NORETURN
|
|
#if defined(__GNUC__) && (__GNUC__ > 2 || \
|
|
(__GNUC__ == 2 && __GNUC_MINOR__ >= 5))
|
|
#define __LA_NORETURN __attribute__((__noreturn__))
|
|
#elif defined(_MSC_VER)
|
|
#define __LA_NORETURN __declspec(noreturn)
|
|
#else
|
|
#define __LA_NORETURN
|
|
#endif
|
|
|
|
#endif /* !BSDCAT_PLATFORM_H_INCLUDED */
|