summaryrefslogtreecommitdiffstats
path: root/src/corelib/plugin/qelfparser_p.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2018-07-02 23:32:28 -0700
committerThiago Macieira <thiago.macieira@intel.com>2018-07-14 04:37:48 +0000
commitb773a02318f71d0251885a7772a0026d8046ab4f (patch)
tree7e5e334e9d3dfd3020d46022910b05f7ae4c2402 /src/corelib/plugin/qelfparser_p.cpp
parent1f27c1161b3cf71485d24124497afb12907792ce (diff)
ELF parser: fix off-by-one error
I don't know why Arvid subtracted 1 when he wrote this code. But it was wrong. Fortunately, the section size was not used afterwards, but the next commit will. Change-Id: I117816bf0f5e469b8d34fffd153dc8383b00b94a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/corelib/plugin/qelfparser_p.cpp')
-rw-r--r--src/corelib/plugin/qelfparser_p.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/plugin/qelfparser_p.cpp b/src/corelib/plugin/qelfparser_p.cpp
index 62555b006d..159a324c6b 100644
--- a/src/corelib/plugin/qelfparser_p.cpp
+++ b/src/corelib/plugin/qelfparser_p.cpp
@@ -224,7 +224,7 @@ int QElfParser::parse(const char *dataStart, ulong fdlen, const QString &library
return Corrupt;
}
*pos = sh.offset;
- *sectionlen = sh.size - 1;
+ *sectionlen = sh.size;
if (shnam[1] == 'q')
return QtMetaDataSection;
}