summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuergen Funk <juergen.funk_ml@cib.de>2019-09-25 12:09:21 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2020-01-23 15:45:24 +0100
commit28b7864b3f7d2b46a9b8384c8a14af5c33fc92c2 (patch)
tree534fc6a1c7a9f8f2183b61b79be9b4629b1988a0
parent2b5659865dc0847eb9626f911606c2c116f4200e (diff)
desktop: proper error checking for crashreport ini reading
Reviewed-on: https://gerrit.libreoffice.org/79603 Reviewed-by: Juergen Funk (CIB) <juergen.funk_ml@cib.de> Tested-by: Juergen Funk (CIB) <juergen.funk_ml@cib.de> (cherry picked from commit 044a683e6c8f864d46fe8ebe3ef5c757cbea30a6) §§{JNKCMD:NoBuild}§§ Change-Id: I1107304a0e3f482b6a7e6110006c2f26b9cb0778 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87261 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
-rw-r--r--desktop/source/minidump/minidump.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/desktop/source/minidump/minidump.cxx b/desktop/source/minidump/minidump.cxx
index f3eefd023b75..0e83ac98905c 100644
--- a/desktop/source/minidump/minidump.cxx
+++ b/desktop/source/minidump/minidump.cxx
@@ -23,7 +23,9 @@ std::map<std::string, std::string> readStrings(std::istream& file)
{
std::map<std::string, std::string> parameters;
- while (!file.eof())
+ // when file is not readable, the status eof would not be set
+ // better test of state is okay
+ while (file)
{
std::string line;
std::getline(file, line);