aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-protocols/net-snmp/net-snmp/CVE-2020-15861-0003.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-networking/recipes-protocols/net-snmp/net-snmp/CVE-2020-15861-0003.patch')
-rw-r--r--meta-networking/recipes-protocols/net-snmp/net-snmp/CVE-2020-15861-0003.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp/CVE-2020-15861-0003.patch b/meta-networking/recipes-protocols/net-snmp/net-snmp/CVE-2020-15861-0003.patch
new file mode 100644
index 0000000000..03acbbab92
--- /dev/null
+++ b/meta-networking/recipes-protocols/net-snmp/net-snmp/CVE-2020-15861-0003.patch
@@ -0,0 +1,40 @@
+From c98808036c86a4ac4877ea13dbcef096b57e49f8 Mon Sep 17 00:00:00 2001
+From: Bart Van Assche <bvanassche@acm.org>
+Date: Wed, 22 May 2019 10:08:53 +0200
+Subject: [PATCH 3/5] libsnmp: Fix a compiler warning
+
+Avoid that the compiler complains on Windows systems that tmpstr[] is not used.
+
+Fixes: 2b3e300ade4a ("CHANGES: libsnmp: Scan MIB directories in alphabetical order")
+
+CVE: CVE-2020-15861
+Upstream-Status: Backport [https://github.com/net-snmp/net-snmp/commit/114e4c2cec2601ca56e8afb1f441520f75a9a312]
+
+Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
+---
+ snmplib/parse.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/snmplib/parse.c b/snmplib/parse.c
+index 200ba25..0414337 100644
+--- a/snmplib/parse.c
++++ b/snmplib/parse.c
+@@ -4980,7 +4980,6 @@ add_mibdir(const char *dirname)
+ FILE *ip;
+ const char *oldFile = File;
+ char **filenames;
+- char tmpstr[300];
+ int count = 0;
+ int filename_count, i;
+ #if !(defined(WIN32) || defined(cygwin))
+@@ -4988,6 +4987,7 @@ add_mibdir(const char *dirname)
+ char space;
+ char newline;
+ struct stat dir_stat, idx_stat;
++ char tmpstr[300];
+ char tmpstr1[300];
+ #endif
+
+--
+2.17.1
+