git.samba.org
/
obnox
/
wireshark
/
wip.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Check for NULL return value from wtap_dump_open().
[obnox/wireshark/wip.git]
/
randpkt.c
diff --git
a/randpkt.c
b/randpkt.c
index 965189b06b5d1e902a66575af350e304767a32e5..650b9dadc7f19a75e559fae521c986642a8ad3a0 100644
(file)
--- a/
randpkt.c
+++ b/
randpkt.c
@@
-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();