Empty if Statement at pcapng.c:788 |
No properties have been set. edit properties |
Jump to warning location ↓ | warning details... |
| |
pcapng_read_packet_block (/home/sate/Testcases/c/cve/wireshark-1.2.0/wiretap/pcapng.c)![]() | ||||||
![]() | ||||||
778 | if (bytes_read <= 0) { | |||||
779 | pcapng_debug0("pcapng_read_packet_block: failed to read option"); | |||||
780 | return bytes_read; | |||||
781 | } | |||||
782 | block_read += bytes_read; | |||||
783 | to_read -= bytes_read; | |||||
784 | ||||||
785 | /* handle option content */ | |||||
786 | switch(oh.option_code) { | |||||
787 | case(0): /* opt_endofopt */ | |||||
788 | if(to_read != 0) {
| |||||
789 | pcapng_debug1("pcapng_read_packet_block: %u bytes after opt_endofopt", to_read); | |||||
790 | } | |||||
791 | /* padding should be ok here, just get out of this */ | |||||
792 | to_read = 0; | |||||
793 | break; | |||||
794 | case(1): /* opt_comment */ | |||||
795 | if(oh.option_length > 0 && oh.option_length < sizeof(option_content)) { | |||||
796 | wblock->data.section.opt_comment = g_strndup(option_content, sizeof(option_content)); | |||||
797 | pcapng_debug1("pcapng_read_packet_block: opt_comment %s", wblock->data.section.opt_comment); | |||||
798 | } else { | |||||
![]() |