Skip to content

Commit

Permalink
Fixed a crash which occurred when extracting RT_BITMAP resources.
Browse files Browse the repository at this point in the history
  • Loading branch information
JusticeRage committed May 23, 2016
1 parent 589b53f commit 346ca36
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion manape/resources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ bool Resource::extract(const boost::filesystem::path& destination)

// Copy the BMP header
boost::shared_ptr<std::vector<boost::uint8_t> > bmp_bytes(new std::vector<boost::uint8_t>(header_size));
memcpy(bmp_bytes.get(), bmp.get(), header_size);
memcpy(&bmp_bytes->at(0), bmp.get(), header_size);
// Copy the image bytes.
bmp_bytes->insert(bmp_bytes->end(), bmp->data.begin(), bmp->data.end());
data = bmp_bytes;
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin_mitigation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class ExploitMitigationsPlugin : public IPlugin
else
{
std::stringstream ss;
ss << "enabled (" << config->SEHandlerCount << " registered handler" << (config->SEHandlerCount > 1 ? "s" : "") << ")";
ss << "enabled (" << config->SEHandlerCount << " registered handler" << (config->SEHandlerCount == 1 ? "s" : "") << ")";
res->add_information("SafeSEH", ss.str());
}

Expand Down

0 comments on commit 346ca36

Please sign in to comment.