Fix: out-of-bound memory access
We need to check for end of stream before updating the current packet
index, else we access memory beyond the last stream packet index array
element. This fixes valgrind errors which appear at commit
480ef05 Support ctf index version 1.1
due to change of the element size, but actually caused by commit
2654fe9 Fix: events discarded timing inaccuracy
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>