Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142029962
D54718.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D54718.diff
View Options
diff --git a/contrib/tcpdump/print-atm.c b/contrib/tcpdump/print-atm.c
--- a/contrib/tcpdump/print-atm.c
+++ b/contrib/tcpdump/print-atm.c
@@ -479,18 +479,12 @@
GET_U_1(oam_ptr.oam_fm_loopback->loopback_indicator) & OAM_FM_LOOPBACK_INDICATOR_MASK),
GET_BE_U_4(oam_ptr.oam_fm_loopback->correlation_tag));
ND_PRINT("\n\tLocation-ID ");
- for (idx = 0; idx < sizeof(oam_ptr.oam_fm_loopback->loopback_id); idx++) {
- if (idx % 2) {
- ND_PRINT("%04x ",
- GET_BE_U_2(&oam_ptr.oam_fm_loopback->loopback_id[idx]));
- }
+ for (idx = 0; idx < sizeof(oam_ptr.oam_fm_loopback->loopback_id); idx += 2) {
+ ND_PRINT("%04x ", GET_BE_U_2(&oam_ptr.oam_fm_loopback->loopback_id[idx]));
}
ND_PRINT("\n\tSource-ID ");
- for (idx = 0; idx < sizeof(oam_ptr.oam_fm_loopback->source_id); idx++) {
- if (idx % 2) {
- ND_PRINT("%04x ",
- GET_BE_U_2(&oam_ptr.oam_fm_loopback->source_id[idx]));
- }
+ for (idx = 0; idx < sizeof(oam_ptr.oam_fm_loopback->source_id); idx += 2) {
+ ND_PRINT("%04x ", GET_BE_U_2(&oam_ptr.oam_fm_loopback->source_id[idx]));
}
break;
@@ -501,11 +495,8 @@
ND_PRINT("\n\tFailure-type 0x%02x",
GET_U_1(oam_ptr.oam_fm_ais_rdi->failure_type));
ND_PRINT("\n\tLocation-ID ");
- for (idx = 0; idx < sizeof(oam_ptr.oam_fm_ais_rdi->failure_location); idx++) {
- if (idx % 2) {
- ND_PRINT("%04x ",
- GET_BE_U_2(&oam_ptr.oam_fm_ais_rdi->failure_location[idx]));
- }
+ for (idx = 0; idx < sizeof(oam_ptr.oam_fm_ais_rdi->failure_location); idx += 2) {
+ ND_PRINT("%04x ", GET_BE_U_2(&oam_ptr.oam_fm_ais_rdi->failure_location[idx]));
}
break;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 16, 4:18 AM (10 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27653776
Default Alt Text
D54718.diff (1 KB)
Attached To
Mode
D54718: tcpdump: Fix buffer overrun in ATM OAM printing
Attached
Detach File
Event Timeline
Log In to Comment