diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2011-03-21 18:58:48 +0000 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2011-03-21 18:58:48 +0000 |
commit | 62559137c4529214bbf27a7c8c43040dd5fe1014 (patch) | |
tree | 93e9dd3ef5e338ba9193449ff8201c85c1a3cc05 /epan | |
parent | 3905d7715c6963fe7228555ed2f20a86a2fe3310 (diff) |
Corrected decoding of oid values with length 5.
This fixes coverity 340.
svn path=/trunk/; revision=36230
Diffstat (limited to 'epan')
-rw-r--r-- | epan/oids.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/epan/oids.c b/epan/oids.c index 893488d201..1653b8c458 100644 --- a/epan/oids.c +++ b/epan/oids.c @@ -1018,11 +1018,11 @@ guint oid_subid2encoded(guint subids_len, guint32* subids, guint8** bytes_p) { switch(len) { default: *bytes_p=NULL; return 0; - case 5: *(b++) = ((subid & 0xF0000000) << 28) | 0x80; - case 4: *(b++) = ((subid & 0x0FE00000 ) >> 21) | 0x80; - case 3: *(b++) = ((subid & 0x001FC000 ) >> 14) | 0x80; - case 2: *(b++) = ((subid & 0x00003F10 ) >> 7) | 0x80; - case 1: *(b++) = subid & 0x0000007F ; break; + case 5: *(b++) = ((subid & 0xF0000000) >> 28) | 0x80; + case 4: *(b++) = ((subid & 0x0FE00000) >> 21) | 0x80; + case 3: *(b++) = ((subid & 0x001FC000) >> 14) | 0x80; + case 2: *(b++) = ((subid & 0x00003F10) >> 7) | 0x80; + case 1: *(b++) = subid & 0x0000007F ; break; } subid = subids[i]; |