[Libreoffice-commits] core.git: sc/source
Julien Nabet
serval2412 at yahoo.fr
Mon Jun 12 10:57:34 UTC 2017
sc/source/ui/unoobj/scdetect.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 57ae8834c8313354477117b65d87c86407f6bf82
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sun Jun 11 12:57:31 2017 +0200
tdf#106423: dbase file can have no records
Regression from https://cgit.freedesktop.org/libreoffice/core/commit/?id=4e3ff19b33c84557fd20e68960499933b4e52638
tdf#84834 sc: stricter type detection for dBASE files
Log test file from tdf#84834 still opens in Writer as expected
Change-Id: Ibf5a0f586e3a132455d2363e61e5cc7ea249002d
Reviewed-on: https://gerrit.libreoffice.org/38660
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Michael Stahl <mstahl at redhat.com>
diff --git a/sc/source/ui/unoobj/scdetect.cxx b/sc/source/ui/unoobj/scdetect.cxx
index 24715d9aad80..cd3ec9d2a750 100644
--- a/sc/source/ui/unoobj/scdetect.cxx
+++ b/sc/source/ui/unoobj/scdetect.cxx
@@ -241,7 +241,8 @@ static bool lcl_MayBeDBase( SvStream& rStream )
}
// tdf#84834 sanity check of size
- if (0 == nRecords || nSize < nHeaderLen + nRecords * sal_uInt64(nRecordSize))
+ // tdf#106423: a dbf file can have 0 record, so no need to check nRecords
+ if (nSize < nHeaderLen + nRecords * sal_uInt64(nRecordSize))
return false;
// Last byte of header must be 0x0d, this is how it's specified.
More information about the Libreoffice-commits
mailing list