diff options
author | stig <stig@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-03-26 15:53:55 +0000 |
---|---|---|
committer | stig <stig@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-03-26 15:53:55 +0000 |
commit | e41a702f4e0ddc0a7b160786eea739fc7232788f (patch) | |
tree | cc4ab9792987c754fe6f7b15f4a8982a39a19523 /tap-megacostat.c | |
parent | 0141fb2dcddd24bf93fa0c7dda1a971f18a2d3b3 (diff) |
Added sanity checks for preferences.
Coverity 551 & 553.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36352 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'tap-megacostat.c')
-rw-r--r-- | tap-megacostat.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tap-megacostat.c b/tap-megacostat.c index d4316daba7..6e5186c688 100644 --- a/tap-megacostat.c +++ b/tap-megacostat.c @@ -87,6 +87,12 @@ megacostat_init(const char *optarg, void* userdata _U_) megaco_ctx_track = prefs_find_preference(prefs_find_module("megaco"),"ctx_info"); h248_ctx_track = prefs_find_preference(prefs_find_module("h248"),"ctx_info"); + + if (!megaco_ctx_track || !h248_ctx_track) { + /* No such preferences */ + return; + } + if (!*megaco_ctx_track->varp.boolp || !*h248_ctx_track->varp.boolp) { printf("Track Context option at Protocols -> MEGACO and Protocols -> H248 preferences\n"); printf("has to be set to true to enable measurement of service response times.\n"); |