[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - sc/source
Julien Nabet
serval2412 at yahoo.fr
Mon Jun 12 14:01:09 UTC 2017
sc/source/ui/unoobj/scdetect.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit d2353a5a8afa5aa0a760b0e6412c2f77aa3a6df6
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>
(cherry picked from commit 57ae8834c8313354477117b65d87c86407f6bf82)
Reviewed-on: https://gerrit.libreoffice.org/38692
Reviewed-by: Lionel Elie Mamane <lionel at mamane.lu>
diff --git a/sc/source/ui/unoobj/scdetect.cxx b/sc/source/ui/unoobj/scdetect.cxx
index 6e3318bdddc8..841191816e45 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