Supply a 0s/0ns value for invalid time value lengths.
authorGuy Harris <guy@alum.mit.edu>
Mon, 16 Jul 2018 04:16:16 +0000 (21:16 -0700)
committerGuy Harris <guy@alum.mit.edu>
Mon, 16 Jul 2018 04:17:26 +0000 (04:17 +0000)
commit118017e3e2e0b3a9b8ec4ac83645d3289a2e06f7
treef1196ed4eacb7c95c027c42e939ae31b5f6680c7
parent16860320e1751ca04c5416a7995a229838e95f1b
Supply a 0s/0ns value for invalid time value lengths.

Other routines that fetch values and can report a type/length error
without throwing an exception return a value, even if it's not the
appropriate value (as there is no appropriate value); make
get_time_value() do the same.

Ideally, we'd mark the protocol tree item, and the value, as being
invalid, and treat invalid values specially, but that's a bigger change
that would involve significantly more mucking about in the innards of
epan/proto.c as well as in code that looks at the protocol tree and at
field values, as well as deciding what the appropriate thing to do is
with a field with no value when, for example, -T {fields,pdml,json,ek,etc.}
is used.

Bug: 14957
Change-Id: Iab91198e560f52809d989cfce8b51b1b027cff73
Reviewed-on: https://code.wireshark.org/review/28722
Reviewed-by: Guy Harris <guy@alum.mit.edu>
epan/proto.c