Ticket #98 (closed defect: fixed)
NULL pointer check for address to exported function
Reported by: | Knut Landmark | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | zoo-kernel | Version: | |
Keywords: | Cc: |
Description
In the following code fragment occurring twice in zoo_service_loader.c, GetProcAddress or dlsym will return NULL if a user has mistyped the service name (the WPS Identifier parameter):
#ifdef WIN32 typedef int (CALLBACK* execute_t)(char***,char***,char***); execute_t execute=(execute_t)GetProcAddress(so,fname); #else typedef int (*execute_t)(char***,char***,char***); execute_t execute=(execute_t)dlsym(so,fname); #endif
This will cause a crash when attempting to invoke the function at the address given by execute:
*eres=execute(&m,&request_input_real_format,&request_output_real_format);
There should be a check to avoid this happening (with an error message).
Change History
Note: See
TracTickets for help on using
tickets.