summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2018-09-14 17:38:53 -0700
committerThiago Macieira <thiago.macieira@intel.com>2018-09-24 15:57:57 +0000
commit9f95f25d2ef3de76d449bc4de5b09e87e9ed537a (patch)
tree2a744a39c18476bc7e2e1a16e8943d762cbb1a03 /src
parent50dd9b10e23df626c35f8d59ae0d0579092eb078 (diff)
Fix integer overflow in very long sections in ELF objects
The source is an ElfXX_Off, which is an unsigned 32- or 64-bit. That means any section bigger than 2 GB would cause an overflow when we assigned in m_stringTableFileOffset = strtab.offset; Change-Id: Ib47c56818178458a88b4fffd15546bd47a89894e Fixes: QTBUG-70560 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> (cherry picked from commit cb5c24fa26142edaff8fd2c9787dbe45c222b4ff) Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/plugin/qelfparser_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/plugin/qelfparser_p.h b/src/corelib/plugin/qelfparser_p.h
index 3e73c5d149..29c73e97d2 100644
--- a/src/corelib/plugin/qelfparser_p.h
+++ b/src/corelib/plugin/qelfparser_p.h
@@ -84,7 +84,7 @@ public:
int m_endian;
int m_bits;
- int m_stringTableFileOffset;
+ qelfoff_t m_stringTableFileOffset;
template <typename T>
T read(const char *s)