Wireshark-commits: [Wireshark-commits] master 4623b05: ssl-utils: refactor "length" parameter into
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Mon, 6 Feb 2017 21:29:53 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=4623b05cd54e323047f6b4266653107f57a88684
Submitter: Alexis La Goutte (alexis.lagoutte@xxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

4623b05 by Peter Wu (peter@xxxxxxxxxxxxx):

    ssl-utils: refactor "length" parameter into "offset_end" for extensions
    
    Change all Hello extension dissector functions to accept the end of the
    extension rather than the extension length. The changes are quite
    mechanical: change "ext_len" to "ext_len = offset_end - offset".
    
    Remove some "offset += ext_len" to ensure that additional unparsed data
    is warned for.
    
    The intent is that (extension) dissectors can easier check for overflow
    (offset + 2 < offset_end). Later changes should remove "guint ext_len"
    with appropriate changes (like replacing by ssl_add_vector).
    
    Change-Id: Ic4846e6fd6164685c4704984136f701bec3afa58
    Reviewed-on: https://code.wireshark.org/review/19932
    Reviewed-by: Alexis La Goutte <alexis.lagoutte@xxxxxxxxx>
    

Actions performed:

    from  f6b7857   ssl-utils: add helper for validating Variable Length Vectors
    adds  4623b05   ssl-utils: refactor "length" parameter into "offset_end" for extensions


Summary of changes:
 epan/dissectors/packet-ssl-utils.c |  100 +++++++++++++++++-------------------
 1 file changed, 48 insertions(+), 52 deletions(-)