summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-01 22:52:50 +0000
committerstuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-01 22:52:50 +0000
commitc1988d9bf96e6cc2d9fb59b170e4714a1ac2b4e4 (patch)
tree00c0ce9699ab174cc533a3828a57feaa59a7b80a
parent9cd649d929b8a0c7cb83189b2fafa2ae45123563 (diff)
downloadchromium_src-c1988d9bf96e6cc2d9fb59b170e4714a1ac2b4e4.zip
chromium_src-c1988d9bf96e6cc2d9fb59b170e4714a1ac2b4e4.tar.gz
chromium_src-c1988d9bf96e6cc2d9fb59b170e4714a1ac2b4e4.tar.bz2
Fix STR size read in Mac plugin loading
Make sure we interpret Pascal string lengths as positive numbers. BUG=21837 TEST=Install the Unity Player plugin, and visit about:plugins; the name "Unity Player" should show. Review URL: http://codereview.chromium.org/453022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33497 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--webkit/glue/plugins/plugin_lib_mac.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/webkit/glue/plugins/plugin_lib_mac.mm b/webkit/glue/plugins/plugin_lib_mac.mm
index d4c93f4..a29a6f7 100644
--- a/webkit/glue/plugins/plugin_lib_mac.mm
+++ b/webkit/glue/plugins/plugin_lib_mac.mm
@@ -163,7 +163,7 @@ bool GetSTRResource(CFBundleRef bundle, short res_id,
if (!str.get())
return false;
contents->push_back(base::SysCFStringRefToUTF8(str.get()));
- pointer += 1+*pointer;
+ pointer += 1+*reinterpret_cast<unsigned char*>(pointer);
}
return true;