diff options
author | gram <gram@f5534014-38df-0310-8fa8-9805f1628bb7> | 2006-04-26 17:31:56 +0000 |
---|---|---|
committer | gram <gram@f5534014-38df-0310-8fa8-9805f1628bb7> | 2006-04-26 17:31:56 +0000 |
commit | 44e48f80730ddd2bfe527dfa63ac8f9ddb097d2e (patch) | |
tree | c274c531e70d73df78683b9de040f306c8dcdc30 /randpkt.c | |
parent | 9d9f491cdf1ecd56af2edd2b92e5379666acadf8 (diff) |
Check for NULL return value from wtap_dump_open().
Fixes coverity bug 159.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18005 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'randpkt.c')
-rw-r--r-- | randpkt.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -483,6 +483,10 @@ main(int argc, char **argv) dump = wtap_dump_open(produce_filename, WTAP_FILE_PCAP, example->sample_wtap_encap, produce_max_bytes, FALSE /* compressed */, &err); + if (!dump) { + printf("Error writing to %s\n", produce_filename); + exit(1); + } seed(); |