]> git.ipfire.org Git - thirdparty/mtr.git/commit
crash fix: ctl->iiwidth_len was not initialized correctly
authorSami Kerola <kerolasa@iki.fi>
Sun, 4 Sep 2016 00:12:08 +0000 (01:12 +0100)
committerSami Kerola <kerolasa@iki.fi>
Sun, 4 Sep 2016 20:12:48 +0000 (21:12 +0100)
commit1b3411356741a6d5050b4984a7e6df9240f3a51c
tree068b2e3082d4c9a6b8c2ca27e4ea8878647d8575
parenta11f445332e62df924c041ce3917be56fbc491d0
crash fix: ctl->iiwidth_len was not initialized correctly

It was a mistake to add iiwidth_len to struct mtr_ctl.  First of all the
value needed in that field was never set, and that resulted to crash when
running command with --csv option.

Secondly adding the field was bad idea to begin with.  Number of array
elements is known only within context of asn.c file, so it is better to add
interface to query it rather than try to set value to a structure.  Later
design is prone to cause futher bugs, if/when execution flow is not as one
might assume.
asn.c
asn.h
mtr.h
report.c