Wireshark-commits: [Wireshark-commits] master a81c8e5: Find the line ending using tvb_find_line_end

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Thu, 26 Dec 2019 18:08:34 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=a81c8e57bfb3596c552d49cf66fa695e0391406d
Submitter: "Guy Harris <guy@xxxxxxxxxxxx>"
Changed: branch: master
Repository: wireshark

Commits:

a81c8e5 by Guy Harris (guy@xxxxxxxxxxxx):

    Find the line ending using tvb_find_line_end().
    
    tvb_find_line_end(), unlike a tvb_find_guint8() looking for an LF,
    returns a length that *doesn't* include the line ending, *regardless* of
    whether the line ends with CR-LF or just LF, so the query string we
    extract is just the query, without any of the line ending.
    
    Update some comments while we're at it to note that the "next_offset"
    pointer argument to tvb_find_line_end() and tvb_find_line_end_unquoted()
    can be NULL, in which case the offset *past* the line ending isn't
    returned.  (We pass tvb_find_line_end() NULL in the aforementioned call,
    because, in that particular case, we don't care about the next line.)
    
    Change-Id: I1c9746e32c61a79f8cb636d577a2e14a07ecab17
    Reviewed-on: https://code.wireshark.org/review/35566
    Petri-Dish: Guy Harris <guy@xxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    

Actions performed:

    from  f0be7f2   Lemon: Squelch an unused parameter warning.
     add  a81c8e5   Find the line ending using tvb_find_line_end().


Summary of changes:
 epan/dissectors/packet-whois.c | 12 ++++++++----
 epan/tvbuff.c                  | 12 ++++++------
 epan/tvbuff.h                  | 12 ++++++------
 3 files changed, 20 insertions(+), 16 deletions(-)