Commit a0f941da authored by Matthias Fechner's avatar Matthias Fechner

Update to r536264.

parent 43b19491
# $FreeBSD: head/archivers/libarchive/Makefile 535391 2020-05-16 10:51:32Z sunpoet $
# $FreeBSD: head/archivers/libarchive/Makefile 536181 2020-05-22 01:58:05Z glewis $
PORTNAME= libarchive
PORTVERSION= 3.4.2
PORTREVISION= 1
PORTVERSION= 3.4.3
PORTEPOCH= 1
CATEGORIES= archivers
MASTER_SITES= https://libarchive.org/downloads/
......
TIMESTAMP = 1582827129
SHA256 (libarchive-3.4.2.tar.gz) = b60d58d12632ecf1e8fad7316dc82c6b9738a35625746b47ecdcaf4aed176176
SIZE (libarchive-3.4.2.tar.gz) = 6979481
TIMESTAMP = 1590112523
SHA256 (libarchive-3.4.3.tar.gz) = ee1e749213c108cb60d53147f18c31a73d6717d7e3d2481c157e1b34c881ea39
SIZE (libarchive-3.4.3.tar.gz) = 6990533
# $FreeBSD: head/audio/jamulus/Makefile 529939 2020-03-31 01:25:43Z linimon $
# $FreeBSD: head/audio/jamulus/Makefile 536189 2020-05-22 08:15:30Z yuri $
PORTNAME= jamulus
DISTVERSION= 3.4.4
DISTVERSION= 3.5.3
CATEGORIES= audio
MASTER_SITES= SF/llcon/${NAME}/${DISTVERSION}/
DISTNAME= ${NAME}-${PORTVERSION}
......@@ -14,8 +14,8 @@ LICENSE_FILE= ${WRKSRC}/COPYING
LIB_DEPENDS= libjack.so:audio/jack
USES= compiler:c++11-lang qmake qt:5
USE_QT= core gui network widgets xml buildtools_build
USES= compiler:c++11-lang pkgconfig qmake qt:5
USE_QT= core gui network widgets xml buildtools_build linguisttools_build
NAME= Jamulus
......
TIMESTAMP = 1585542387
SHA256 (Jamulus-3.4.4.tar.gz) = 886611f452d64e6a0245ef2f8ae2911a746b78bbdaad9b296116e627974e6c97
SIZE (Jamulus-3.4.4.tar.gz) = 1509046
TIMESTAMP = 1590134666
SHA256 (Jamulus-3.5.3.tar.gz) = f19d3a5bdd482462ee014a5e52a97c305419b66ca406bd5bd565bdf829e378de
SIZE (Jamulus-3.5.3.tar.gz) = 1839088
# Created by: John Hixson <john@pcbsd.org>
# $FreeBSD: head/audio/pianobar/Makefile 520672 2019-12-22 22:26:41Z mandree $
# $FreeBSD: head/audio/pianobar/Makefile 536219 2020-05-22 19:20:42Z sunpoet $
PORTNAME= pianobar
PORTVERSION= 2019.02.14
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= audio
MASTER_SITES= https://6xq.net/${PORTNAME}/
......
# Created by: John Hixson <jhixson@FreeBSD.org>
# $FreeBSD: head/audio/pianod2/Makefile 529999 2020-03-31 18:02:32Z jhixson $
# $FreeBSD: head/audio/pianod2/Makefile 536259 2020-05-23 02:10:28Z jhixson $
PORTNAME= pianod2
PORTVERSION= 309
PORTVERSION= 329
CATEGORIES= audio
MASTER_SITES= http://deviousfish.com/Downloads/pianod2/Devel/
......
TIMESTAMP = 1585608632
SHA256 (pianod2-309.tar.gz) = 757eb034b27136692f26b87c7f0d693ea1a407feaee9ba9d08e558409b74fd4a
SIZE (pianod2-309.tar.gz) = 796840
TIMESTAMP = 1590195796
SHA256 (pianod2-329.tar.gz) = 48f2409a0c033fc92ac90e2e4beafc736b119cdcd7532ab140f3cb32da5f7e68
SIZE (pianod2-329.tar.gz) = 802609
--- configure.ac.orig 2020-03-17 17:41:27 UTC
+++ configure.ac
@@ -19,7 +19,7 @@
--- configure.ac.org 2020-05-22 18:04:30.726838000 -0700
+++ configure.ac 2020-05-22 18:07:12.289613000 -0700
@@ -20,7 +20,7 @@
AC_PREREQ([2.68])
AC_CONFIG_MACRO_DIRS([m4])
AC_INIT([pianod2],
- m4_esyscmd([svn info svn://svn.deviousfish.com/pianod2 | grep Revision: | awk '{print $2}' | tr -d '\n']),
+ [309],
- m4_esyscmd([svn info svn://svn.deviousfish.com/pianod2/trunk | grep Revision: | awk '{print $2}' | tr -d '\n']),
+ [329],
[pianod@lists.deviousfish.com],
,[http://deviousfish.com/pianod2])
AM_INIT_AUTOMAKE([foreign -Wall -Werror])
@@ -543,9 +543,9 @@ AS_IF([test "$with_libao" != "no" ], [
@@ -552,9 +552,9 @@
# Check for libsdl
AS_IF([test "$with_libsdl" != "no" ], [
......
--- src/mediaunits/pandora/pandorasource.cpp.orig 2020-03-17 17:41:28 UTC
+++ src/mediaunits/pandora/pandorasource.cpp
@@ -15,6 +15,7 @@
#include <limits.h>
#include <unistd.h>
+#include <netinet/in.h>
#include <arpa/inet.h>
#include <resolv.h>
# $FreeBSD: head/cad/solvespace/Makefile 516745 2019-11-04 21:36:13Z zeising $
# $FreeBSD: head/cad/solvespace/Makefile 536219 2020-05-22 19:20:42Z sunpoet $
PORTNAME= solvespace
PORTVERSION= 2.3
PORTREVISION= 4
DISTVERSIONPREFIX= v
PORTREVISION= 5
CATEGORIES= cad
MAINTAINER= swills@FreeBSD.org
......
# Created by: rene@FreeBSD.org
# $FreeBSD: head/comms/dcf77pi/Makefile 531972 2020-04-17 20:22:15Z rene $
# $FreeBSD: head/comms/dcf77pi/Makefile 536219 2020-05-22 19:20:42Z sunpoet $
PORTNAME= dcf77pi
PORTVERSION= 3.7.1.1
DISTVERSIONPREFIX=v
PORTREVISION= 1
CATEGORIES= comms
MAINTAINER= rene@FreeBSD.org
......
# Created by: Loïc BARTOLETTI <lbartoletti@FreeBSD.org>
# $FreeBSD: head/databases/postgis23/Makefile 534326 2020-05-08 05:35:11Z lbartoletti $
# $FreeBSD: head/databases/postgis23/Makefile 536219 2020-05-22 19:20:42Z sunpoet $
PORTNAME= postgis
PORTVERSION= 2.3.10
PORTREVISION= 3
PORTREVISION= 4
CATEGORIES= databases geography
MASTER_SITES= https://download.osgeo.org/postgis/source/
PKGNAMESUFFIX= 23
......
# Created by: Loïc BARTOLETTI <lbartoletti@FreeBSD.org>
# $FreeBSD: head/databases/postgis24/Makefile 534326 2020-05-08 05:35:11Z lbartoletti $
# $FreeBSD: head/databases/postgis24/Makefile 536219 2020-05-22 19:20:42Z sunpoet $
PORTNAME= postgis
PORTVERSION= 2.4.8
PORTREVISION= 3
PORTREVISION= 4
CATEGORIES= databases geography
MASTER_SITES= https://download.osgeo.org/postgis/source/
PKGNAMESUFFIX= 24
......
# Created by: Loïc BARTOLETTI <lbartoletti@FreeBSD.org>
# $FreeBSD: head/databases/postgis25/Makefile 534326 2020-05-08 05:35:11Z lbartoletti $
# $FreeBSD: head/databases/postgis25/Makefile 536219 2020-05-22 19:20:42Z sunpoet $
PORTNAME= postgis
PORTVERSION= 2.5.4
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= databases geography
MASTER_SITES= https://download.osgeo.org/postgis/source/
PKGNAMESUFFIX= 25
......
# Created by: Loïc BARTOLETTI <lbartoletti@FreeBSD.org>
# $FreeBSD: head/databases/postgis30/Makefile 534326 2020-05-08 05:35:11Z lbartoletti $
# $FreeBSD: head/databases/postgis30/Makefile 536219 2020-05-22 19:20:42Z sunpoet $
PORTNAME= postgis
PORTVERSION= 3.0.1
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= databases geography
MASTER_SITES= https://download.osgeo.org/postgis/source/
PKGNAMESUFFIX= 30
......
# Created by: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
# $FreeBSD: head/databases/py-tableschema/Makefile 533497 2020-05-01 05:01:06Z sunpoet $
# $FreeBSD: head/databases/py-tableschema/Makefile 536155 2020-05-21 20:44:42Z sunpoet $
PORTNAME= tableschema
PORTVERSION= 1.17.0
PORTVERSION= 1.18.0
CATEGORIES= databases python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
......@@ -13,7 +13,8 @@ COMMENT= Utility library for working with Table Schema
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE.md
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}click>=3.3:devel/py-click@${PY_FLAVOR} \
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cached-property>=1.5:devel/py-cached-property@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}click>=3.3:devel/py-click@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}dateutil>=2.4:devel/py-dateutil@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}isodate>=0.5.4:devel/py-isodate@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}jsonschema>=2.5:devel/py-jsonschema@${PY_FLAVOR} \
......
TIMESTAMP = 1588279612
SHA256 (tableschema-1.17.0.tar.gz) = d162fcad8682cf79dc8a7bc47378df9b8d5228486242c33c8fd03d3a5c711a69
SIZE (tableschema-1.17.0.tar.gz) = 5599336
TIMESTAMP = 1590084158
SHA256 (tableschema-1.18.0.tar.gz) = cdbb7dddec4ee39ad46fbaa3117ec2e75374b2b8c154c99d37e7d6f533669045
SIZE (tableschema-1.18.0.tar.gz) = 5680709
# $FreeBSD: head/deskutils/py-khard/Makefile 534966 2020-05-11 23:51:58Z dbaio $
# $FreeBSD: head/deskutils/py-khard/Makefile 536255 2020-05-23 00:52:31Z dbaio $
PORTNAME= khard
DISTVERSION= 0.15.1
DISTVERSION= 0.16.1
CATEGORIES= deskutils python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
......@@ -20,16 +20,18 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}atomicwrites>=0.1.7:devel/py-atomicwrites@${
${PYTHON_PKGNAMEPREFIX}vobject>=0.9.5:deskutils/py-vobject@${PY_FLAVOR}
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools_scm>0:devel/py-setuptools_scm@${PY_FLAVOR} \
${PY_SPHINX} \
${PYTHON_PKGNAMEPREFIX}sphinx-autoapi>0:textproc/py-sphinx-autoapi@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}sphinx-autodoc-typehints>0:textproc/py-sphinx-autodoc-typehints@${PY_FLAVOR} \
${RUN_DEPENDS}
USES= python:3.5+ gmake
USES= python:3.6+ gmake
USE_PYTHON= autoplist distutils
NO_ARCH= yes
PLIST_FILES= share/zsh/site-functions/_khard \
share/zsh/site-functions/_email-khard \
${EXAMPLESDIR}/khard.conf.example \
${EXAMPLESDIR}/template_for_contact_creation.yaml \
${EXAMPLESDIR}/template.yaml \
man/man1/khard.1.gz \
man/man5/khard.conf.5.gz
......@@ -51,7 +53,7 @@ post-install:
${INSTALL_DATA} ${WRKSRC}/misc/zsh/_email-khard \
${STAGEDIR}${PREFIX}/share/zsh/site-functions
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
(cd ${WRKSRC}/misc/khard/ && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR})
(cd ${WRKSRC}/doc/source/examples/ && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR})
${INSTALL_MAN} ${WRKSRC}/doc/build/man/khard.1 ${STAGEDIR}${MANPREFIX}/man/man1
${INSTALL_MAN} ${WRKSRC}/doc/build/man/khard.conf.5 ${STAGEDIR}${MANPREFIX}/man/man5
......
TIMESTAMP = 1573153524
SHA256 (khard-0.15.1.tar.gz) = 5ca8e678133e08fa4861cc31aedf9f30b4f8e3958ed66ede025c23ec5e176aa1
SIZE (khard-0.15.1.tar.gz) = 5099734
TIMESTAMP = 1586632028
SHA256 (khard-0.16.1.tar.gz) = 0d9f67a575ac945365c7748cf71f39d3b2281462977254d2e325ceff0ac4e439
SIZE (khard-0.16.1.tar.gz) = 626967
# $FreeBSD: head/deskutils/semantik/Makefile 533517 2020-05-01 06:51:02Z tcberner $
# $FreeBSD: head/deskutils/semantik/Makefile 536192 2020-05-22 09:32:48Z amdmi3 $
PORTNAME= semantik
DISTVERSION= 1.2.5
......@@ -9,6 +9,7 @@ MAINTAINER= kde@FreeBSD.org
COMMENT= Mind mapping tool
LICENSE= GPLv3
LICENSE_FILE= ${WRKSRC}/LICENSE
USES= kde:5 pkgconfig python:3.6+ qt:5 shebangfix tar:bzip2 waf \
desktop-file-utils gettext shared-mime-info
......@@ -41,13 +42,9 @@ PLIST_SUB= PORTVERSION="${PORTVERSION}"
OPTIONS_DEFINE= NLS
OPTIONS_SUB= yes
.include <bsd.port.options.mk>
post-patch:
.if ! ${PORT_OPTIONS:MNLS}
post-patch-NLS-off:
@${REINPLACE_CMD} -e '/langs/ d' \
${WRKSRC}/wscript
.endif
post-install:
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${PORTNAME} \
......
# $FreeBSD: head/devel/Makefile 536030 2020-05-21 01:28:34Z dbaio $
# $FreeBSD: head/devel/Makefile 536174 2020-05-21 21:46:56Z salvadore $
#
COMMENT = Development utilities
......@@ -4472,6 +4472,7 @@
SUBDIR += py-grpcio
SUBDIR += py-grpcio-gcp
SUBDIR += py-grpcio-tools
SUBDIR += py-gs_api_client
SUBDIR += py-gtfslib
SUBDIR += py-gyp
SUBDIR += py-hash_ring
......@@ -6720,6 +6721,7 @@
SUBDIR += tkp4
SUBDIR += tl-expected
SUBDIR += tla
SUBDIR += tllist
SUBDIR += tmake
SUBDIR += tnt
SUBDIR += tokamak
......
# $FreeBSD: head/devel/electron4/Makefile 534907 2020-05-11 11:11:26Z tagattie $
# $FreeBSD: head/devel/electron4/Makefile 536180 2020-05-22 01:19:33Z jbeich $
PORTNAME= electron
DISTVERSIONPREFIX= v
DISTVERSION= ${ELECTRON_VER:S/-beta./.b/}
PORTREVISION= 3
PORTREVISION= 4
CATEGORIES= devel
MASTER_SITES= https://github.com/tagattie/FreeBSD-Electron/releases/download/v4.1.0/:chromium \
https://commondatastorage.googleapis.com/chromium-browser-official/:chromium_official \
......
# $FreeBSD: head/devel/electron6/Makefile 535858 2020-05-19 12:51:37Z tagattie $
# $FreeBSD: head/devel/electron6/Makefile 536180 2020-05-22 01:19:33Z jbeich $
PORTNAME= electron
DISTVERSIONPREFIX= v
DISTVERSION= ${ELECTRON_VER:S/-beta./.b/}
PORTREVISION= 1
CATEGORIES= devel java
MASTER_SITES= https://github.com/tagattie/FreeBSD-Electron/releases/download/v6.0.9/:chromium \
https://commondatastorage.googleapis.com/chromium-browser-official/:chromium_official \
......
# $FreeBSD: head/devel/electron7/Makefile 535508 2020-05-17 02:27:09Z tagattie $
# $FreeBSD: head/devel/electron7/Makefile 536180 2020-05-22 01:19:33Z jbeich $
PORTNAME= electron
DISTVERSIONPREFIX= v
DISTVERSION= ${ELECTRON_VER:S/-beta./.b/}
PORTREVISION= 1
CATEGORIES= devel java
MASTER_SITES= https://github.com/tagattie/FreeBSD-Electron/releases/download/v7.1.5/:chromium \
https://commondatastorage.googleapis.com/chromium-browser-official/:chromium_official \
......
# Created by: Dmitry Marakasov <amdmi3@FreeBSD.org>
# $FreeBSD: head/devel/fossology-nomos-standalone/Makefile 534991 2020-05-12 12:00:21Z amdmi3 $
# $FreeBSD: head/devel/fossology-nomos-standalone/Makefile 536219 2020-05-22 19:20:42Z sunpoet $
PORTNAME= fossology
PORTVERSION= 3.8.0
PORTREVISION= 1
CATEGORIES= devel
PKGNAMESUFFIX= -nomos-standalone
......
# Created by: gno@yahoo-inc.com
# $FreeBSD: head/devel/json-c/Makefile 522673 2020-01-11 10:43:31Z sunpoet $
# $FreeBSD: head/devel/json-c/Makefile 536171 2020-05-21 20:46:06Z sunpoet $
PORTNAME= json-c
PORTVERSION= 0.13.1
PORTREVISION= 1
PORTVERSION= 0.14
CATEGORIES= devel
MASTER_SITES= https://s3.amazonaws.com/json-c_releases/releases/ \
LOCAL/sunpoet
......@@ -14,18 +13,15 @@ COMMENT= JSON (JavaScript Object Notation) implementation in C
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/COPYING
USES= autoreconf compiler:c11 cpe libtool pathfix pkgconfig
USES= cmake compiler:c11 cpe
GNU_CONFIGURE= yes
INSTALL_TARGET= install-strip
TEST_TARGET= check
CMAKE_OFF= BUILD_DOCUMENTATION
CMAKE_ON= BUILD_SHARED_LIBS BUILD_STATIC_LIBS DISABLE_WERROR
TEST_TARGET= test
USE_LDCONFIG= yes
CPE_VENDOR= json-c_project
post-patch:
@${REINPLACE_CMD} -e 's| -Werror||g' ${WRKSRC}/Makefile.in
post-install:
${INSTALL_DATA} ${WRKSRC}/json_object_private.h ${STAGEDIR}${PREFIX}/include/json-c/
......
TIMESTAMP = 1520527097
SHA256 (json-c-0.13.1.tar.gz) = b87e608d4d3f7bfdd36ef78d56d53c74e66ab278d318b71e6002a369d36f4873
SIZE (json-c-0.13.1.tar.gz) = 639425
TIMESTAMP = 1588350160
SHA256 (json-c-0.14.tar.gz) = b377de08c9b23ca3b37d9a9828107dff1de5ce208ff4ebb35005a794f30c6870
SIZE (json-c-0.14.tar.gz) = 321677
Obtained from: https://github.com/json-c/json-c/commit/8b511c402b73d1d8b195991891c8d44859cb57ec
https://github.com/json-c/json-c/commit/22870ac2bd4cfdd135887ecc8cbbe02e7ef0c34e
https://github.com/json-c/json-c/commit/4f43a077a497f94214645ce9763247ec085e2094
--- CMakeLists.txt.orig 2020-04-19 03:39:09 UTC
+++ CMakeLists.txt
@@ -65,6 +65,7 @@ include(GNUInstallDirs)
include(CMakePackageConfigHelpers)
option(BUILD_SHARED_LIBS "Default to building shared libraries" ON)
+option(BUILD_STATIC_LIBS "Default to building static libraries" ON)
# Generate a release merge and test it to verify the correctness of republishing the package.
ADD_CUSTOM_TARGET(distcheck
@@ -299,7 +300,7 @@ if ($ENV{VALGRIND})
endif()
set(JSON_C_PUBLIC_HEADERS
- ${PROJECT_BINARY_DIR}/config.h
+ # Note: config.h is _not_ included here
${PROJECT_BINARY_DIR}/json_config.h
${PROJECT_SOURCE_DIR}/json.h
@@ -383,7 +384,7 @@ add_library(${PROJECT_NAME}
set_target_properties(${PROJECT_NAME} PROPERTIES
VERSION 5.0.0
SOVERSION 5)
-
+list(APPEND CMAKE_TARGETS ${PROJECT_NAME})
# If json-c is used as subroject it set to target correct interface -I flags and allow
# to build external target without extra include_directories(...)
target_include_directories(${PROJECT_NAME}
@@ -392,7 +393,22 @@ target_include_directories(${PROJECT_NAME}
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}>
)
-install(TARGETS ${PROJECT_NAME}
+# Allow to build static and shared libraries at the same time
+if (BUILD_STATIC_LIBS AND BUILD_SHARED_LIBS)
+ set(STATIC_LIB ${PROJECT_NAME}-static)
+ add_library(${STATIC_LIB} STATIC
+ ${JSON_C_SOURCES}
+ ${JSON_C_HEADERS}
+ )
+
+ # rename the static library
+ set_target_properties(${STATIC_LIB} PROPERTIES
+ OUTPUT_NAME ${PROJECT_NAME}
+ )
+ list(APPEND CMAKE_TARGETS ${STATIC_LIB})
+endif ()
+
+install(TARGETS ${CMAKE_TARGETS}
EXPORT ${PROJECT_NAME}-targets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
Obtained from: https://github.com/json-c/json-c/commit/31243e4d1204ef78be34b0fcae73221eee6b83be
--- arraylist.c.orig 2020-04-19 03:36:00 UTC
+++ arraylist.c
@@ -136,6 +136,9 @@ int array_list_del_idx(struct array_list *arr, size_t
{
size_t i, stop;
+ /* Avoid overflow in calculation with large indices. */
+ if (idx > SIZE_T_MAX - count)
+ return -1;
stop = idx + count;
if (idx >= arr->length || stop > arr->length)
return -1;
--- json_object.c.orig 2020-02-18 20:12:20 UTC
--- json_object.c.orig 2020-04-19 03:36:00 UTC
+++ json_object.c
@@ -698,9 +698,9 @@ int64_t json_object_get_int64(const struct json_object
case json_type_int:
return jso->o.c_int64;
case json_type_double:
- if (jso->o.c_double >= INT64_MAX)
+ if (jso->o.c_double >= (double)INT64_MAX)
@@ -735,7 +735,7 @@ int64_t json_object_get_int64(const struct json_object
// so cast to tell the compiler it's ok to round up.
if (jso->o.c_double >= (double)INT64_MAX)
return INT64_MAX;
- if (jso->o.c_double <= INT64_MIN)
+ if (jso->o.c_double <= (double)INT64_MIN)
return INT64_MIN;
return (int64_t)jso->o.c_double;
case json_type_boolean:
case json_type_boolean: return jso->o.c_boolean;
Obtained from: https://github.com/json-c/json-c/commit/31243e4d1204ef78be34b0fcae73221eee6b83be
https://github.com/json-c/json-c/commit/519dfe1591d85432986f9762d41d1a883198c157
--- linkhash.c.orig 2020-04-19 03:36:00 UTC
+++ linkhash.c
@@ -12,6 +12,7 @@
#include "config.h"
+#include <assert.h>
#include <limits.h>
#include <stdarg.h>
#include <stddef.h>
@@ -499,6 +500,8 @@ struct lh_table *lh_table_new(int size, lh_entry_free_
int i;
struct lh_table *t;
+ /* Allocate space for elements to avoid divisions by zero. */
+ assert(size > 0);
t = (struct lh_table *)calloc(1, sizeof(struct lh_table));
if (!t)
return NULL;
@@ -577,9 +580,12 @@ int lh_table_insert_w_hash(struct lh_table *t, const v
{
unsigned long n;
- if (t->count >= t->size * LH_LOAD_FACTOR)
- if (lh_table_resize(t, t->size * 2) != 0)
+ if (t->count >= t->size * LH_LOAD_FACTOR) {
+ /* Avoid signed integer overflow with large tables. */
+ int new_size = (t->size > INT_MAX / 2) ? INT_MAX : (t->size * 2);
+ if (t->size == INT_MAX || lh_table_resize(t, new_size) != 0)
return -1;
+ }
n = h % t->size;
Obtained from: https://github.com/json-c/json-c/commit/31243e4d1204ef78be34b0fcae73221eee6b83be
--- printbuf.c.orig 2020-04-19 03:36:00 UTC
+++ printbuf.c
@@ -15,6 +15,7 @@
#include "config.h"
+#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -65,10 +66,16 @@ static int printbuf_extend(struct printbuf *p, int min
if (p->size >= min_size)
return 0;
-