From 093aebf5eeab624471a659cf8643a6a07e2b58e6 Mon Sep 17 00:00:00 2001 From: Pascal Quantin Date: Sun, 7 Jun 2015 18:03:25 +0200 Subject: H248: fix V712 warning reported by PVS-Studio Be advised that compiler may delete this cycle or make it infinity. Use volatile variable(s) or synchronization primitives to avoid this. Change-Id: I39104ec09f4c12994d62ed23e7a0cc00829b1255 Reviewed-on: https://code.wireshark.org/review/8818 Reviewed-by: Pascal Quantin --- asn1/h248/packet-h248-template.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'asn1') diff --git a/asn1/h248/packet-h248-template.c b/asn1/h248/packet-h248-template.c index b67bdb32f3..59084ca0b8 100644 --- a/asn1/h248/packet-h248-template.c +++ b/asn1/h248/packet-h248-template.c @@ -942,10 +942,11 @@ void h248_register_package(h248_package_t* pkg, pkg_reg_action reg_action) { if (!try_val_to_str_idx((pkg_found->id)<<16, base_signal_name_vals, &j)) { j++; idx=j; while((base_signal_name_vals[j].strptr != NULL) && ((base_signal_name_vals[j].value>>16) == (pkg_found->id))) { + j++; }; if (idx < j) { - vst = g_new0(value_string,j-idx+1); - for (k=0;idx