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
<[email protected]> wrote:
> URL: 
> https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=e16500e80f85641b28971498c3fc580eab800055
> Submitter: Guy Harris ([email protected])
> Changed: branch: master
> Repository: wireshark
>
> Commits:
>
> e16500e by Guy Harris ([email protected]):
>
>     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 <[email protected]>
>
>
> 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 <[email protected]>
> Archives:    https://www.wireshark.org/lists/wireshark-commits
> Unsubscribe: https://wireshark.org/mailman/options/wireshark-commits
>              
> mailto:[email protected]?subject=unsubscribe
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <[email protected]>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:[email protected]?subject=unsubscribe

Reply via email to