Don't exceed the maximum number of bytes.
Don't exceed the maximum number of bytes.

We received data from a device where the end-of-profile marker is
missing. Because the device fails to locate the last dive, it goes into
an infinite loop, and keeps sending the same sequence of dives over and
over again. As a result, we receive more data than expected, and the
assert in the progress event is triggered.

We now keep track of the maximum number of bytes remaining and abort
once the limit is passed. The values of the progress events are capped
at the maximum value to avoid the assertion.

josh-wambua/libdivecomputer,venkateshshukla/libdivecomputer,Poltsi/libdivecomputer-vms,henrik242/libdivecomputer,glance-/libdivecomputer,venkateshshukla/libdivecomputer,glance-/libdivecomputer,josh-wambua/libdivecomputer,henrik242/libdivecomputer