diff options
author | gerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-06-22 15:37:46 +0000 |
---|---|---|
committer | gerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-06-22 15:37:46 +0000 |
commit | a54a283eaaaa833b936ba5ad9feb47e957dddcb8 (patch) | |
tree | db9bd2e5f6eb000da06e75657e825ac1abe4e130 /epan/to_str.c | |
parent | 8bd74ded877c68843f3cf82408209ad08eee0d68 (diff) |
Fix an off-by-four error, which should take care of bugs 254 - 258. Print
OID values as unsigned ints instead of signed.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14729 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/to_str.c')
-rw-r--r-- | epan/to_str.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/to_str.c b/epan/to_str.c index 6641ea61cf..b820ab2e74 100644 --- a/epan/to_str.c +++ b/epan/to_str.c @@ -915,19 +915,19 @@ gchar* oid_to_str_buf(const guint8 *oid, gint oid_len, gchar *buf) { bufp = buf; value=0; for (i=0; i<oid_len; i++){ byte = oid[i]; - if ((bufp - buf) > (MAX_OID_STR_LEN - 12)) { + if ((bufp - buf) > (MAX_OID_STR_LEN - 16)) { /* "4294967295" + ".>>>" + '\0' + 1 */ bufp += sprintf(bufp, ".>>>"); break; } if (i == 0) { - bufp += sprintf(bufp, "%d.%d", byte/40, byte%40); + bufp += sprintf(bufp, "%u.%u", byte/40, byte%40); continue; } value = (value << 7) | (byte & 0x7F); if (byte & 0x80) { continue; } - bufp += sprintf(bufp, ".%d", value); + bufp += sprintf(bufp, ".%u", value); value = 0; } *bufp = '\0'; |