Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 452026 - Warns on values > 2^31
Summary: Warns on values > 2^31
Alias: None
Product: Fedora
Classification: Fedora
Component: net-snmp
Version: 8
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Jan Safranek
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2008-06-18 18:23 UTC by Henrik Nordstrom
Modified: 2008-06-18 18:32 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2008-06-18 18:32:03 UTC

Attachments (Terms of Use)

Description Henrik Nordstrom 2008-06-18 18:23:55 UTC
Description of problem:

snmpget of a counter32 variable having a value of 0xFFFF0000 results in a
warning "truncating unsigned value to 32 bits (2)".

Version-Release number of selected component (if applicable):


How reproducible:

Each time querying for a SNMP variable with a value > 2^31.

Steps to Reproduce:

No simple test case created yet.

1. Set up an SNMP agent having a Counter32 variable with a value > 2^31.
2. snmpget of that variable
Actual results:

snmpget prints the above warning, and outputs the correct result.

Expected results:

No warning unless the integer was ASN encoded using more than 4 bytes.

Additional info:

The value was ASN encoded using 3 bytes (24 bits). The error is most likely from
sign extension, which is done on all ASN.1 encoded integers.

Comment 1 Henrik Nordstrom 2008-06-18 18:32:03 UTC
On a second thought it may be an agent error.. it's better if the value is
encoded  using 5 bytes


to prevent sign extension, and gets rid of the warning.

So it's not a bug. Gone.

Note You need to log in before you can comment on or make changes to this bug.