Chromium Code Reviews| Index: chrome/renderer/pepper/pepper_flash_font_file_host.cc |
| diff --git a/chrome/renderer/pepper/pepper_flash_font_file_host.cc b/chrome/renderer/pepper/pepper_flash_font_file_host.cc |
| index b427265cb6cadb63829aeed961573b6139ceb36c..524c2276c6d43df3301ecdeffc7e58af17289cd4 100644 |
| --- a/chrome/renderer/pepper/pepper_flash_font_file_host.cc |
| +++ b/chrome/renderer/pepper/pepper_flash_font_file_host.cc |
| @@ -57,11 +57,12 @@ int32_t PepperFlashFontFileHost::OnGetFontTable( |
| #if defined(OS_LINUX) || defined(OS_OPENBSD) |
|
palmer
2013/03/14 19:26:43
What about the other BSDs? Chromium works pretty w
bbudge
2013/03/15 22:25:34
Perhaps, but I don't know anything about Flash. If
|
| if (fd_ != -1) { |
| size_t length = 0; |
| - if (content::GetFontTable(fd_, table, NULL, &length)) { |
| + if (content::GetFontTable(fd_, table, 0 /* offset */, NULL, &length)) { |
| contents.resize(length); |
| uint8_t* contents_ptr = |
| reinterpret_cast<uint8_t*>(const_cast<char*>(contents.c_str())); |
| - if (content::GetFontTable(fd_, table, contents_ptr, &length)) { |
| + if (content::GetFontTable(fd_, table, 0 /* offset */, |
|
palmer
2013/03/14 19:26:43
TOCTOU problem here? |length| is updated by this c
bbudge
2013/03/15 22:25:34
I'd rather keep changes minimal for the Flash (Fla
|
| + contents_ptr, &length)) { |
| result = PP_OK; |
| } else { |
| contents.clear(); |