Ticket #98 (closed defect: fixed)

Opened 10 years ago

Last modified 10 years ago

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

Changed 10 years ago by djay

  • status changed from new to closed
  • resolution set to fixed

Thanks a lot for your report.

This should be solved from r469, as you can see on line 453 of zoo_service_loader.c, we are now checking for the NULL value retruned by both functions (ref.).

Note: See TracTickets for help on using tickets.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png