The count comes straight from the file, so take the bytes left in the
record as the upper bound on it.
Thanks to Manan Patel (0xManan).
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ia803201408a3f2f886af257941afd33edecebd46
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13225
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
(cherry picked from commit 6159c54074e7dbda025f5bf4f6a6a0f8bab26ca7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211317
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
(cherry picked from commit 5e82ea09ca)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211331