diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2013-03-01 11:57:27 -0800 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-07-20 02:09:41 +0200 |
commit | 53bcd630612a713eef994d83ce06d383ff17a8b8 (patch) | |
tree | 5603ead582f20ab80a1e55bf397427e207c24efc /src/corelib/plugin/qlibrary.cpp | |
parent | 2b0cf53df77e4cc49d582b23bfec292eeca327c5 (diff) |
Make the Mach-O size checking a little more robust
It's not necessary to check at every point if we know the minimum file
size: it must contain at least the header, one segment (__TEXT) and one
section (qtmetadata). Most files have more than one segment and more
than one loader command, so this check does not mean we can eliminate
the checks further down.
Also be more resilient against corruptions in the header data: check not
only the additions, but the values themselves. For example, an offset +
size addition could be smaller than the file size when the addition
overflows in 32-bit. Another thing is that the cmdsize fields could be
corrupt too.
Change-Id: I7968a769c1cbe9150270c91823cafc4f8f833876
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/corelib/plugin/qlibrary.cpp')
0 files changed, 0 insertions, 0 deletions