FreeBSD Bugzilla – Attachment 216850 Details for
Bug 248340
devel/json-c: Update to 0.15
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for json-c
jsonc015.patch (text/plain), 7.82 KB, created by
Daniel Engberg
on 2020-07-29 06:13:55 UTC
(
hide
)
Description:
Patch for json-c
Filename:
MIME Type:
Creator:
Daniel Engberg
Created:
2020-07-29 06:13:55 UTC
Size:
7.82 KB
patch
obsolete
>diff --git a/devel/json-c/Makefile b/devel/json-c/Makefile >index 13ac2a0577a2..a2968ad711b4 100644 >--- a/devel/json-c/Makefile >+++ b/devel/json-c/Makefile >@@ -2,7 +2,7 @@ > # $FreeBSD$ > > PORTNAME= json-c >-PORTVERSION= 0.14 >+PORTVERSION= 0.15 > CATEGORIES= devel > MASTER_SITES= https://s3.amazonaws.com/json-c_releases/releases/ \ > LOCAL/sunpoet >diff --git a/devel/json-c/distinfo b/devel/json-c/distinfo >index fbbf6314dc87..b2a6c829cb92 100644 >--- a/devel/json-c/distinfo >+++ b/devel/json-c/distinfo >@@ -1,3 +1,3 @@ >-TIMESTAMP = 1588350160 >-SHA256 (json-c-0.14.tar.gz) = b377de08c9b23ca3b37d9a9828107dff1de5ce208ff4ebb35005a794f30c6870 >-SIZE (json-c-0.14.tar.gz) = 321677 >+TIMESTAMP = 1596001230 >+SHA256 (json-c-0.15.tar.gz) = b8d80a1ddb718b3ba7492916237bbf86609e9709fb007e7f7d4322f02341a4c6 >+SIZE (json-c-0.15.tar.gz) = 361488 >diff --git a/devel/json-c/files/patch-CMakeLists.txt b/devel/json-c/files/patch-CMakeLists.txt >deleted file mode 100644 >index 548abae940ef..000000000000 >--- a/devel/json-c/files/patch-CMakeLists.txt >+++ /dev/null >@@ -1,56 +0,0 @@ >-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} >diff --git a/devel/json-c/files/patch-arraylist.c b/devel/json-c/files/patch-arraylist.c >deleted file mode 100644 >index 536792b98149..000000000000 >--- a/devel/json-c/files/patch-arraylist.c >+++ /dev/null >@@ -1,14 +0,0 @@ >-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; >diff --git a/devel/json-c/files/patch-json_object.c b/devel/json-c/files/patch-json_object.c >deleted file mode 100644 >index 3ed5770ba26a..000000000000 >--- a/devel/json-c/files/patch-json_object.c >+++ /dev/null >@@ -1,11 +0,0 @@ >---- json_object.c.orig 2020-04-19 03:36:00 UTC >-+++ json_object.c >-@@ -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: return jso->o.c_boolean; >diff --git a/devel/json-c/files/patch-linkhash.c b/devel/json-c/files/patch-linkhash.c >deleted file mode 100644 >index 9416cd973eb2..000000000000 >--- a/devel/json-c/files/patch-linkhash.c >+++ /dev/null >@@ -1,37 +0,0 @@ >-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; >- >diff --git a/devel/json-c/files/patch-printbuf.c b/devel/json-c/files/patch-printbuf.c >deleted file mode 100644 >index 85714873e81d..000000000000 >--- a/devel/json-c/files/patch-printbuf.c >+++ /dev/null >@@ -1,52 +0,0 @@ >-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; >-- >-- new_size = p->size * 2; >-- if (new_size < min_size + 8) >-+ /* Prevent signed integer overflows with large buffers. */ >-+ if (min_size > INT_MAX - 8) >-+ return -1; >-+ if (p->size > INT_MAX / 2) >- new_size = min_size + 8; >-+ else { >-+ new_size = p->size * 2; >-+ if (new_size < min_size + 8) >-+ new_size = min_size + 8; >-+ } >- #ifdef PRINTBUF_DEBUG >- MC_DEBUG("printbuf_memappend: realloc " >- "bpos=%d min_size=%d old_size=%d new_size=%d\n", >-@@ -83,6 +90,9 @@ static int printbuf_extend(struct printbuf *p, int min >- >- int printbuf_memappend(struct printbuf *p, const char *buf, int size) >- { >-+ /* Prevent signed integer overflows with large buffers. */ >-+ if (size > INT_MAX - p->bpos - 1) >-+ return -1; >- if (p->size <= p->bpos + size + 1) >- { >- if (printbuf_extend(p, p->bpos + size + 1) < 0) >-@@ -100,6 +110,9 @@ int printbuf_memset(struct printbuf *pb, int offset, i >- >- if (offset == -1) >- offset = pb->bpos; >-+ /* Prevent signed integer overflows with large buffers. */ >-+ if (len > INT_MAX - offset) >-+ return -1; >- size_needed = offset + len; >- if (pb->size < size_needed) >- { >diff --git a/devel/json-c/pkg-plist b/devel/json-c/pkg-plist >index 49076ec4a8de..7d0971f7e6bc 100644 >--- a/devel/json-c/pkg-plist >+++ b/devel/json-c/pkg-plist >@@ -20,5 +20,5 @@ lib/cmake/json-c/json-c-targets.cmake > lib/libjson-c.a > lib/libjson-c.so > lib/libjson-c.so.5 >-lib/libjson-c.so.5.0.0 >+lib/libjson-c.so.5.1.0 > libdata/pkgconfig/json-c.pc
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 248340
: 216850