diff options
author | DENG Qingfang <dengqf6@mail2.sysu.edu.cn> | 2020-06-18 14:20:15 +0800 |
---|---|---|
committer | Hans Dedecker <dedeckeh@gmail.com> | 2020-07-04 21:00:11 +0200 |
commit | 78b632134f1597e4cc6498a7bb913c4f9b036caf (patch) | |
tree | 50629c2396cb3519d0453fe211a94c14a6b4ae60 /package/libs/libjson-c/patches/002-Prevent-division-by-zero-in-linkhash.patch | |
parent | 4bb5e331a781c2d4f3040c70df328b1ef90f1871 (diff) | |
download | upstream-78b632134f1597e4cc6498a7bb913c4f9b036caf.tar.gz upstream-78b632134f1597e4cc6498a7bb913c4f9b036caf.tar.bz2 upstream-78b632134f1597e4cc6498a7bb913c4f9b036caf.zip |
libjson-c: update to 0.14
Update libjson-c to 0.14
Changelog: https://github.com/json-c/json-c/wiki/Notes-for-v0.14-release
Switch to CMake because the upstream build system was changed
ipk size increased by 2KB
Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
Diffstat (limited to 'package/libs/libjson-c/patches/002-Prevent-division-by-zero-in-linkhash.patch')
-rw-r--r-- | package/libs/libjson-c/patches/002-Prevent-division-by-zero-in-linkhash.patch | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/package/libs/libjson-c/patches/002-Prevent-division-by-zero-in-linkhash.patch b/package/libs/libjson-c/patches/002-Prevent-division-by-zero-in-linkhash.patch deleted file mode 100644 index d37fe5857b..0000000000 --- a/package/libs/libjson-c/patches/002-Prevent-division-by-zero-in-linkhash.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 77d935b7ae7871a1940cd827e850e6063044ec45 Mon Sep 17 00:00:00 2001 -From: Tobias Stoeckmann <tobias@stoeckmann.org> -Date: Mon, 4 May 2020 19:46:45 +0200 -Subject: [PATCH 2/2] Prevent division by zero in linkhash. - -If a linkhash with a size of zero is created, then modulo operations -are prone to division by zero operations. - -Purely protective measure against bad usage. ---- - linkhash.c | 3 +++ - 1 file changed, 3 insertions(+) - ---- a/linkhash.c -+++ b/linkhash.c -@@ -12,6 +12,7 @@ - - #include "config.h" - -+#include <assert.h> - #include <stdio.h> - #include <string.h> - #include <stdlib.h> -@@ -498,6 +499,8 @@ struct lh_table* lh_table_new(int size, - 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; |