Wireshark-dev: Re: [Wireshark-dev] [Wireshark-commits] master e16500e: Fix check for NUL at the
From: Evan Huus <eapache@xxxxxxxxx>
Date: Tue, 12 May 2015 18:13:35 -0400
Argh, one of these days I will learn to just put parentheses in rather
than taking guesses at C operator precedence :(

On Tue, May 12, 2015 at 6:10 PM, Wireshark code review
<code-review-do-not-reply@xxxxxxxxxxxxx> wrote:
> URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=e16500e80f85641b28971498c3fc580eab800055
> Submitter: Guy Harris (guy@xxxxxxxxxxxx)
> Changed: branch: master
> Repository: wireshark
>
> Commits:
>
> e16500e by Guy Harris (guy@xxxxxxxxxxxx):
>
>     Fix check for NUL at the end of a string.
>
>     *seq[slength - 1] means *(seq[slength - 1]), where seq points to a
>     "const gchar *", so it fetches the pointer at an offset of slength - 1
>     from the pointer to which seq points, and dereferences that pointer.
>     What's wanted is (*seq)[slength - 1], i.e. fetch the pointer to which
>     seq points, and fetch the byte at an offset of slength - 1 from the byte
>     to which said pointer points.
>
>     Change-Id: I7246f5e6093d035bad59be530893f3fc54dad97e
>     Reviewed-on: https://code.wireshark.org/review/8441
>     Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
>
>
> Actions performed:
>
>     from  99ca421   Qt: Display filter completion fixes.
>     adds  e16500e   Fix check for NUL at the end of a string.
>
>
> Summary of changes:
>  epan/dissectors/packet-giop.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> ___________________________________________________________________________
> Sent via:    Wireshark-commits mailing list <wireshark-commits@xxxxxxxxxxxxx>
> Archives:    https://www.wireshark.org/lists/wireshark-commits
> Unsubscribe: https://wireshark.org/mailman/options/wireshark-commits
>              mailto:wireshark-commits-request@xxxxxxxxxxxxx?subject=unsubscribe