Use BSWAP16 instead of BSWAP32 for 16-bit values. Fixes CID's 1179 and 1180.
authorcmaynard <cmaynard@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 31 Mar 2011 16:46:16 +0000 (16:46 +0000)
committercmaynard <cmaynard@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 31 Mar 2011 16:46:16 +0000 (16:46 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36422 f5534014-38df-0310-8fa8-9805f1628bb7

wiretap/pcapng.c

index 76ec9294f3d0577728120e4b68f366349c303bf8..bb94df2773589a55ecd3384227752d786a0ba5d6 100644 (file)
@@ -1119,8 +1119,8 @@ pcapng_read_name_resolution_block(FILE_T fh, pcapng_block_header_t *bh, pcapng_t
                block_read += bytes_read;
 
                if (pn->byte_swapped) {
-                       nrb.record_type = BSWAP32(nrb.record_type);
-                       nrb.record_len  = BSWAP32(nrb.record_len);
+                       nrb.record_type = BSWAP16(nrb.record_type);
+                       nrb.record_len  = BSWAP16(nrb.record_len);
                }
 
                switch(nrb.record_type) {