diff options
author | Jeff Morriss <jeff.morriss@ulticom.com> | 2011-01-12 17:20:52 +0000 |
---|---|---|
committer | Jeff Morriss <jeff.morriss@ulticom.com> | 2011-01-12 17:20:52 +0000 |
commit | 45920c1e15e214bf325d666e62c52f32ba417af4 (patch) | |
tree | 894380a6fc2231660cdfc364f20ed43e1a249efb /epan/tvbuff.c | |
parent | 46f62f1b498d7722b348c0eaf4f8d0d949896f9e (diff) |
Fix the fuzz failure in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5574 :
The first time a value_string_ext() is accessed, _match_strval_ext_init() is
used before the real match function is called. This function was not expanded
to take an idx parameter (in rev 35451). It compiled only because the function:
a) previously did not match _value_string_match_t
b) and the difference was being cast away when assigning _match_strval to it
(So the fact that the index parameter was not added was also ignored.)
To fix the problem, give _match_strval_ext_init() and index parameter and use
it instead of a dummy variable when calling the real match function. That way
the first call to match_strval_ext_idx() will return an actual (initialized)
index.
To prevent the problem in the future, make the vse argument to
_match_strval_ext_init() const *and then cast away the constness* so the
function can modify the vse.
svn path=/trunk/; revision=35508
Diffstat (limited to 'epan/tvbuff.c')
0 files changed, 0 insertions, 0 deletions