Wireshark-commits: [Wireshark-commits] master e16500e: Fix check for NUL at the end of a string.
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(-)