|
|
34d7f3 |
1104293 - net-snmp OID 32 bit integer returning number larger than 32 bit signed value
|
|
|
34d7f3 |
1192221 - net-snmp OID 32 bit integer returning number larger than 32 bit signed value
|
|
|
34d7f3 |
|
|
|
34d7f3 |
commit 6a421248afab56035066355727380781d515c545
|
|
|
34d7f3 |
Author: Jan Safranek <jsafranek@users.sourceforge.net>
|
|
|
34d7f3 |
Date: Mon Jan 26 10:40:10 2015 +0100
|
|
|
34d7f3 |
|
|
|
34d7f3 |
Fix 32 bit integeres in hrStorageTable.
|
|
|
34d7f3 |
|
|
|
34d7f3 |
RFC says the integers are de-facto 31 bits: 1..2147483647.
|
|
|
34d7f3 |
|
|
|
34d7f3 |
diff --git a/agent/mibgroup/host/hrh_storage.c b/agent/mibgroup/host/hrh_storage.c
|
|
|
34d7f3 |
index ca2f854..96b7198 100644
|
|
|
34d7f3 |
--- a/agent/mibgroup/host/hrh_storage.c
|
|
|
34d7f3 |
+++ b/agent/mibgroup/host/hrh_storage.c
|
|
|
34d7f3 |
@@ -421,7 +421,7 @@ really_try_next:
|
|
|
34d7f3 |
if (store_idx > NETSNMP_MEM_TYPE_MAX) {
|
|
|
34d7f3 |
if (netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID,
|
|
|
34d7f3 |
NETSNMP_DS_AGENT_REALSTORAGEUNITS))
|
|
|
34d7f3 |
- long_return = HRFS_entry->units & 0xffffffff;
|
|
|
34d7f3 |
+ long_return = HRFS_entry->units & 0x7fffffff;
|
|
|
34d7f3 |
else
|
|
|
34d7f3 |
long_return = HRFS_entry->units_32;
|
|
|
34d7f3 |
} else {
|
|
|
34d7f3 |
@@ -434,7 +434,7 @@ really_try_next:
|
|
|
34d7f3 |
if (store_idx > NETSNMP_MEM_TYPE_MAX) {
|
|
|
34d7f3 |
if (netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID,
|
|
|
34d7f3 |
NETSNMP_DS_AGENT_REALSTORAGEUNITS))
|
|
|
34d7f3 |
- long_return = HRFS_entry->size & 0xffffffff;
|
|
|
34d7f3 |
+ long_return = HRFS_entry->size & 0x7fffffff;
|
|
|
34d7f3 |
else
|
|
|
34d7f3 |
long_return = HRFS_entry->size_32;
|
|
|
34d7f3 |
} else {
|
|
|
34d7f3 |
@@ -447,7 +447,7 @@ really_try_next:
|
|
|
34d7f3 |
if (store_idx > NETSNMP_MEM_TYPE_MAX) {
|
|
|
34d7f3 |
if (netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID,
|
|
|
34d7f3 |
NETSNMP_DS_AGENT_REALSTORAGEUNITS))
|
|
|
34d7f3 |
- long_return = HRFS_entry->used & 0xffffffff;
|
|
|
34d7f3 |
+ long_return = HRFS_entry->used & 0x7fffffff;
|
|
|
34d7f3 |
else
|
|
|
34d7f3 |
long_return = HRFS_entry->used_32;
|
|
|
34d7f3 |
} else {
|