diff options
author | Robert Falkenberg | 2022-11-14 12:01:54 +0100 |
---|---|---|
committer | Robert Falkenberg | 2022-11-14 12:01:54 +0100 |
commit | d75cbd05398a52998f220c58353413b7c3ed62cd (patch) | |
tree | 9e045671b74f80e4a9629a411db895bf79e45243 /0004-lib-asn1_utils-fix-out-of-bounds-access-on-zero-size.patch | |
parent | 9c1b7d48a2b09f4cae51036d7e3b5689b542af00 (diff) | |
download | aur-d75cbd05398a52998f220c58353413b7c3ed62cd.tar.gz |
Update to 22.10.0
Diffstat (limited to '0004-lib-asn1_utils-fix-out-of-bounds-access-on-zero-size.patch')
-rw-r--r-- | 0004-lib-asn1_utils-fix-out-of-bounds-access-on-zero-size.patch | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/0004-lib-asn1_utils-fix-out-of-bounds-access-on-zero-size.patch b/0004-lib-asn1_utils-fix-out-of-bounds-access-on-zero-size.patch deleted file mode 100644 index 7de6fdf0625b..000000000000 --- a/0004-lib-asn1_utils-fix-out-of-bounds-access-on-zero-size.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 0c9ba5b87ee246b772c9deb2993834f0b7fc088b Mon Sep 17 00:00:00 2001 -From: Robert Falkenberg <robert.falkenberg@srs.io> -Date: Fri, 13 May 2022 16:47:52 +0200 -Subject: [PATCH] lib,asn1_utils: fix out of bounds access on zero-sized array -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -* fix error: ... offset 0 is out of the bounds [0, 0] [-Werror=array-bounds] -* fix note: destination object of size 0 allocated by ‘operator new []’ ---> data_ = new T[cap_]; ---- - lib/include/srsran/asn1/asn1_utils.h | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/lib/include/srsran/asn1/asn1_utils.h b/lib/include/srsran/asn1/asn1_utils.h -index 87696d7b6..f1dcfcd74 100644 ---- a/lib/include/srsran/asn1/asn1_utils.h -+++ b/lib/include/srsran/asn1/asn1_utils.h -@@ -193,8 +193,12 @@ public: - { - size_ = nof_items; - cap_ = nof_items; -- data_ = new T[cap_]; -- std::copy(ptr, ptr + size_, data_); -+ if (ptr != NULL) { -+ data_ = new T[cap_]; -+ std::copy(ptr, ptr + size_, data_); -+ } else { -+ data_ = NULL; -+ } - } - ~dyn_array() - { --- -2.36.1 - |