From 91c83d842c54180f98b23a1cf8878b9d7a22f1b2 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 14 Sep 2018 17:38:53 -0700 Subject: Fix integer overflow in very long sections in ELF objects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) (cherry picked from commit cb5c24fa26142edaff8fd2c9787dbe45c222b4ff) Reviewed-by: Jędrzej Nowacki (cherry picked from commit 9f95f25d2ef3de76d449bc4de5b09e87e9ed537a) --- src/corelib/plugin/qelfparser_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/plugin') diff --git a/src/corelib/plugin/qelfparser_p.h b/src/corelib/plugin/qelfparser_p.h index 5501be009b..35361f99fd 100644 --- a/src/corelib/plugin/qelfparser_p.h +++ b/src/corelib/plugin/qelfparser_p.h @@ -77,7 +77,7 @@ public: int m_endian; int m_bits; - int m_stringTableFileOffset; + qelfoff_t m_stringTableFileOffset; template T read(const char *s) -- cgit v1.2.3