blob: 03acbbab9225d3247e87fc00f0555ac7c3fba08b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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
|