summaryrefslogtreecommitdiffstats
path: root/src/corelib/plugin
diff options
context:
space:
mode:
authorPino Toscano <toscano.pino@tiscali.it>2012-05-15 12:40:15 (GMT)
committerQt by Nokia <qt-info@nokia.com>2012-05-16 09:53:12 (GMT)
commit9e981c4dd03effc2c52b52f529edfa8955e534ce (patch)
treed76ff02a781f13ae7a853af96fb320f314eae939 /src/corelib/plugin
parent051f7e20cfe74bc3ff5497b18c51eabd4ed071dd (diff)
downloadQt-9e981c4dd03effc2c52b52f529edfa8955e534ce.zip
Qt-9e981c4dd03effc2c52b52f529edfa8955e534ce.tar.gz
Qt-9e981c4dd03effc2c52b52f529edfa8955e534ce.tar.bz2
QElfParser: fix type of sh_size
The type of the sh_size field of a section header is either Elf32_Word or Elf64_Xword, so the type used cannot be qelfword_t (always 32 bits) but qelfoff_t. Change-Id: Ia380b6823913fee7a96b39f742630ae3a9ca0cb8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Arvid Picciani <arvid.picciani@nokia.com> (backport of 77b179689ba37dc909778fdd00df2701f83a2868 from qtbase)
Diffstat (limited to 'src/corelib/plugin')
-rw-r--r--src/corelib/plugin/qelfparser_p.cpp4
-rw-r--r--src/corelib/plugin/qelfparser_p.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/plugin/qelfparser_p.cpp b/src/corelib/plugin/qelfparser_p.cpp
index cfe9a9d..33fff42 100644
--- a/src/corelib/plugin/qelfparser_p.cpp
+++ b/src/corelib/plugin/qelfparser_p.cpp
@@ -61,8 +61,8 @@ const char *QElfParser::parseSectionHeader(const char *data, ElfSectionHeader *s
+ sizeof(qelfaddr_t); // sh_addr
sh->offset = read<qelfoff_t>(data);
data += sizeof(qelfoff_t); // sh_offset
- sh->size = read<qelfword_t>(data);
- data += sizeof(qelfword_t); // sh_size
+ sh->size = read<qelfoff_t>(data);
+ data += sizeof(qelfoff_t); // sh_size
return data;
}
diff --git a/src/corelib/plugin/qelfparser_p.h b/src/corelib/plugin/qelfparser_p.h
index 2f10807..e552cbc 100644
--- a/src/corelib/plugin/qelfparser_p.h
+++ b/src/corelib/plugin/qelfparser_p.h
@@ -80,7 +80,7 @@ public:
qelfword_t name;
qelfword_t type;
qelfoff_t offset;
- qelfword_t size;
+ qelfoff_t size;
};
int m_endian;