Wireshark-commits: [Wireshark-commits] master e80f9cd: Fix crash on invalid SSH_CONNECTION and SSH_
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=e80f9cda3801720739c87d291a2974b21c1395e9
Submitter: Michael Mann (mmann78@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark
Commits:
e80f9cd by Peter Wu (peter@xxxxxxxxxxxxx):
Fix crash on invalid SSH_CONNECTION and SSH_CLIENT values
The third parameter to g_strsplit is the maximum number of elements, you
cannot just assume that a vector with exactly that number of elements
is available. This will crash for example: `SSH_CONNECTION= wireshark`.
This patch takes care of that and also fixes a memleak due to missing
g_strfreev. To reduce code bloat, return the filter at last so that
g_strfreev does not have to be repeated before returning.
Note that it still possible for the filter to contain absolute junk
since the port and host number is not validated...
Change-Id: I4414d2a748f83ded59775fb1e733ce1250cfc553
Reviewed-on: https://code.wireshark.org/review/1100
Reviewed-by: Michael Mann <mmann78@xxxxxxxxxxxx>
Actions performed:
from 3066190 Bug 8214. Don't let array ett_ variables limit the number of array elements dissected. Also add support for set and bag dissection.
adds e80f9cd Fix crash on invalid SSH_CONNECTION and SSH_CLIENT values
Summary of changes:
ui/util.c | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)