ieee1722: fix Division by Zero found by Clang Analyzer and Coverity (CID 1371610)

Change-Id: Iac0ef122062f8dc3160e112d76c35a256f8d8c2a
Reviewed-on: https://code.wireshark.org/review/17201
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
Alexis La Goutte 2016-08-21 16:21:40 +02:00 committed by Michael Mann
parent 07611921be
commit 7804be057e
1 changed files with 1 additions and 1 deletions

View File

@ -1089,7 +1089,7 @@ static int dissect_1722_aaf (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
ti = proto_tree_add_item(ti_aaf_tree, hf_1722_aaf_data, tvb, offset, datalen, ENC_NA);
ti_audio_tree = proto_item_add_subtree(ti, ett_1722_aaf_audio);
if (sample_width == 0)
if (sample_width == 0 || channels_per_frame == 0)
{
expert_add_info(pinfo, ti, &ei_aaf_sample_width);
}