summaryrefslogtreecommitdiff
path: root/desktop/source/minidump
diff options
context:
space:
mode:
authorJuergen Funk <juergen.funk_ml@cib.de>2019-09-25 12:09:21 +0200
committerJuergen Funk (CIB) <juergen.funk_ml@cib.de>2019-10-01 10:35:16 +0200
commit044a683e6c8f864d46fe8ebe3ef5c757cbea30a6 (patch)
tree4d4aad9925338bde359557a031f205081c2abda6 /desktop/source/minidump
parentb5adb2433de4f376c253a813a632e982c7ac90c5 (diff)
desktop: proper error checking for crashreport ini reading
Change-Id: I1107304a0e3f482b6a7e6110006c2f26b9cb0778 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>
Diffstat (limited to 'desktop/source/minidump')
-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 85b2374e4ad7..f9666bff5998 100644
--- a/desktop/source/minidump/minidump.cxx
+++ b/desktop/source/minidump/minidump.cxx
@@ -23,7 +23,9 @@ static 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);