aboutsummaryrefslogtreecommitdiffstats
path: root/package/libs/libjson-c/patches/001-Protect-array_list_del_idx-against-size_t-overflow.patch
diff options
context:
space:
mode:
authorDENG Qingfang <dengqf6@mail2.sysu.edu.cn>2020-06-18 14:20:15 +0800
committerHans Dedecker <dedeckeh@gmail.com>2020-07-04 21:00:11 +0200
commit78b632134f1597e4cc6498a7bb913c4f9b036caf (patch)
tree50629c2396cb3519d0453fe211a94c14a6b4ae60 /package/libs/libjson-c/patches/001-Protect-array_list_del_idx-against-size_t-overflow.patch
parent4bb5e331a781c2d4f3040c70df328b1ef90f1871 (diff)
downloadupstream-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/001-Protect-array_list_del_idx-against-size_t-overflow.patch')
-rw-r--r--package/libs/libjson-c/patches/001-Protect-array_list_del_idx-against-size_t-overflow.patch27
1 files changed, 0 insertions, 27 deletions
diff --git a/package/libs/libjson-c/patches/001-Protect-array_list_del_idx-against-size_t-overflow.patch b/package/libs/libjson-c/patches/001-Protect-array_list_del_idx-against-size_t-overflow.patch
deleted file mode 100644
index 456fbf35ff..0000000000
--- a/package/libs/libjson-c/patches/001-Protect-array_list_del_idx-against-size_t-overflow.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 099016b7e8d70a6d5dd814e788bba08d33d48426 Mon Sep 17 00:00:00 2001
-From: Tobias Stoeckmann <tobias@stoeckmann.org>
-Date: Mon, 4 May 2020 19:41:16 +0200
-Subject: [PATCH 1/2] Protect array_list_del_idx against size_t overflow.
-
-If the assignment of stop overflows due to idx and count being
-larger than SIZE_T_MAX in sum, out of boundary access could happen.
-
-It takes invalid usage of this function for this to happen, but
-I decided to add this check so array_list_del_idx is as safe against
-bad usage as the other arraylist functions.
----
- arraylist.c | 3 +++
- 1 file changed, 3 insertions(+)
-
---- a/arraylist.c
-+++ b/arraylist.c
-@@ -135,6 +135,9 @@ array_list_del_idx( struct array_list *a
- {
- 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;
- for ( i = idx; i < stop; ++i ) {