author | Tomas Klacko <tomas.klacko@oracle.com> |
Mon, 03 Nov 2014 02:10:16 -0800 | |
branch | s11u2-sru |
changeset 3450 | 3b2640ec70f8 |
permissions | -rw-r--r-- |
3450
3b2640ec70f8
19547764 problem in UTILITY/NET-SNMP
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff
changeset
|
1 |
http://sourceforge.net/p/net-snmp/code/ci/4c5633f1603e4bd03ed05c37d782ec8911759c47/ |
3b2640ec70f8
19547764 problem in UTILITY/NET-SNMP
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff
changeset
|
2 |
|
3b2640ec70f8
19547764 problem in UTILITY/NET-SNMP
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff
changeset
|
3 |
diff --git a/agent/mibgroup/agent/extend.c b/agent/mibgroup/agent/extend.c |
3b2640ec70f8
19547764 problem in UTILITY/NET-SNMP
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff
changeset
|
4 |
index 00d270a..cd0b2d6 100644 |
3b2640ec70f8
19547764 problem in UTILITY/NET-SNMP
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff
changeset
|
5 |
--- a/agent/mibgroup/agent/extend.c |
3b2640ec70f8
19547764 problem in UTILITY/NET-SNMP
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff
changeset
|
6 |
+++ b/agent/mibgroup/agent/extend.c |
3b2640ec70f8
19547764 problem in UTILITY/NET-SNMP
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff
changeset
|
7 |
@@ -1132,7 +1132,7 @@ _extend_find_entry( netsnmp_request_info *request, |
3b2640ec70f8
19547764 problem in UTILITY/NET-SNMP
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff
changeset
|
8 |
* ...and check the line requested is valid |
3b2640ec70f8
19547764 problem in UTILITY/NET-SNMP
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff
changeset
|
9 |
*/ |
3b2640ec70f8
19547764 problem in UTILITY/NET-SNMP
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff
changeset
|
10 |
line_idx = *table_info->indexes->next_variable->val.integer; |
3b2640ec70f8
19547764 problem in UTILITY/NET-SNMP
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff
changeset
|
11 |
- if (eptr->numlines < line_idx) |
3b2640ec70f8
19547764 problem in UTILITY/NET-SNMP
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff
changeset
|
12 |
+ if (line_idx < 1 || line_idx > eptr->numlines) |
3b2640ec70f8
19547764 problem in UTILITY/NET-SNMP
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff
changeset
|
13 |
return NULL; |
3b2640ec70f8
19547764 problem in UTILITY/NET-SNMP
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff
changeset
|
14 |
} |
3b2640ec70f8
19547764 problem in UTILITY/NET-SNMP
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff
changeset
|
15 |
return eptr; |
3b2640ec70f8
19547764 problem in UTILITY/NET-SNMP
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff
changeset
|
16 |
@@ -1305,6 +1305,10 @@ handle_nsExtendOutput2Table(netsnmp_mib_handler *handler, |
3b2640ec70f8
19547764 problem in UTILITY/NET-SNMP
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff
changeset
|
17 |
* Determine which line we've been asked for.... |
3b2640ec70f8
19547764 problem in UTILITY/NET-SNMP
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff
changeset
|
18 |
*/ |
3b2640ec70f8
19547764 problem in UTILITY/NET-SNMP
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff
changeset
|
19 |
line_idx = *table_info->indexes->next_variable->val.integer; |
3b2640ec70f8
19547764 problem in UTILITY/NET-SNMP
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff
changeset
|
20 |
+ if (line_idx < 1 || line_idx > extension->numlines) { |
3b2640ec70f8
19547764 problem in UTILITY/NET-SNMP
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff
changeset
|
21 |
+ netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHINSTANCE); |
3b2640ec70f8
19547764 problem in UTILITY/NET-SNMP
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff
changeset
|
22 |
+ continue; |
3b2640ec70f8
19547764 problem in UTILITY/NET-SNMP
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff
changeset
|
23 |
+ } |
3b2640ec70f8
19547764 problem in UTILITY/NET-SNMP
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff
changeset
|
24 |
cp = extension->lines[line_idx-1]; |
3b2640ec70f8
19547764 problem in UTILITY/NET-SNMP
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff
changeset
|
25 |
|
3b2640ec70f8
19547764 problem in UTILITY/NET-SNMP
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff
changeset
|
26 |
/* |