summaryrefslogtreecommitdiff
path: root/epan/oids.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2011-03-21 18:58:48 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2011-03-21 18:58:48 +0000
commit62559137c4529214bbf27a7c8c43040dd5fe1014 (patch)
tree93e9dd3ef5e338ba9193449ff8201c85c1a3cc05 /epan/oids.c
parent3905d7715c6963fe7228555ed2f20a86a2fe3310 (diff)
downloadwireshark-62559137c4529214bbf27a7c8c43040dd5fe1014.tar.gz
Corrected decoding of oid values with length 5.
This fixes coverity 340. svn path=/trunk/; revision=36230
Diffstat (limited to 'epan/oids.c')
-rw-r--r--epan/oids.c10
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];