Prevent NULL pointer dereference passed to FT_Module_Requester.
This commit is contained in:
parent
c9669a8a63
commit
d9145241fe
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
||||
2010-02-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
|
||||
|
||||
Prevent NULL pointer dereference passed to FT_Module_Requester.
|
||||
|
||||
* src/sfnt/sfdriver.c (sfnt_get_interface): Don't use `module'.
|
||||
* src/psnames/psmodule.c (psnames_get_interface): Ditto.
|
||||
|
||||
* src/cff/cffdrivr.c (cff_get_interface): Check NULL `driver'.
|
||||
* src/truetype/ttdriver.c (tt_get_interface): Ditto.
|
||||
|
||||
2010-01-29 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
|
||||
|
||||
Fix memory leaks in previous patch.
|
||||
|
@ -621,14 +621,15 @@
|
||||
{
|
||||
FT_Module sfnt;
|
||||
FT_Module_Interface result;
|
||||
FT_Library library = driver->library;
|
||||
FT_UNUSED(library);
|
||||
|
||||
|
||||
result = ft_service_list_lookup( FT_CFF_SERVICES_GET, module_interface );
|
||||
if ( result != NULL )
|
||||
return result;
|
||||
|
||||
if ( !driver )
|
||||
return NULL;
|
||||
|
||||
/* we pass our request to the `sfnt' module */
|
||||
sfnt = FT_Get_Module( driver->library, "sfnt" );
|
||||
|
||||
|
@ -561,8 +561,7 @@
|
||||
psnames_get_service( FT_Module module,
|
||||
const char* service_id )
|
||||
{
|
||||
FT_Library library = module->library;
|
||||
FT_UNUSED(library);
|
||||
FT_UNUSED( module );
|
||||
|
||||
return ft_service_list_lookup( FT_PSCMAPS_SERVICES_GET, service_id );
|
||||
}
|
||||
|
@ -417,8 +417,6 @@
|
||||
sfnt_get_interface( FT_Module module,
|
||||
const char* module_interface )
|
||||
{
|
||||
FT_Library library = module->library;
|
||||
FT_UNUSED(library);
|
||||
FT_UNUSED( module );
|
||||
|
||||
return ft_service_list_lookup( FT_SFNT_SERVICES_GET, module_interface );
|
||||
|
@ -402,16 +402,17 @@
|
||||
tt_get_interface( FT_Module driver, /* TT_Driver */
|
||||
const char* tt_interface )
|
||||
{
|
||||
FT_Library library = driver->library;
|
||||
FT_Module_Interface result;
|
||||
FT_Module sfntd;
|
||||
SFNT_Service sfnt;
|
||||
FT_UNUSED(library);
|
||||
|
||||
result = ft_service_list_lookup( FT_TT_SERVICES_GET, tt_interface );
|
||||
if ( result != NULL )
|
||||
return result;
|
||||
|
||||
if ( !driver )
|
||||
return NULL;
|
||||
|
||||
/* only return the default interface from the SFNT module */
|
||||
sfntd = FT_Get_Module( driver->library, "sfnt" );
|
||||
if ( sfntd )
|
||||
|
Loading…
Reference in New Issue
Block a user