Wireshark-bugs: [Wireshark-bugs] [Bug 5895] Wireshark crashes if Lua contains "Pref.range()" wit
Date: Sat, 4 Jun 2011 16:03:49 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5895

Bobby Tables <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #6459|                            |review_for_checkin?
               Flag|                            |

--- Comment #1 from Bobby Tables <[email protected]> 2011-06-04 19:03:44 EDT ---
Created an attachment (id=6459)
 --> (https://bugs.wireshark.org/bugzilla/attachment.cgi?id=6459)
Patch - adds null-checks to range.c and argument validation to Pref.range

The root problem was that range_convert_str_work() (range.c:125 in Rev 37546
and maybe earlier revisions) did not check its arguments for null. When a range
string isn't provided for Pref.range, null is passed to
range_convert_str_work(), which tries to dereference the null (segfault).

I added null-checks for all functions in range.c (except one that already had
it).

Another problem was that Pref.range did not validate the argument type for the
range string, which allowed the null through to range_convert_str_work(). This
effectively lets the range argument be optional for Pref.range, which makes no
sense since we're defining a range preference.

I added argument validation for the range string so that an error message is
displayed if it fails the type check (it is no longer optional).

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.