Home My Page Projects Code Snippets Project Openings DPWS Core
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files Mediawiki

[#403] Segmentation fault can occur when using only one version of the DPWS specification

Date:
2014-02-12 09:51
Priority:
3
State:
Open
Submitted by:
Stéphane ROUGES (srouges)
Assigned to:
Stéphane ROUGES (srouges)
Target Fix Version:
v2.5.1
Product:
DPWS Core
Operating System:
none
Component:
DCRuntime
Version:
v2.5.0
Severity:
minor
Resolution:
Fixed
Hardware:
none
URL:
Summary:
Segmentation fault can occur when using only one version of the DPWS specification

Detailed description
Raised by an unregistered user:

In dcDPWS_Registry.c, function set_service_class_ptr_att(), (dpws_protocols[1] is never set, so it is a NULL pointer)
for (i = 0; i < N_DPWS_VERSIONS; i++) {
if (QNAME_EQUALS(dpws_protocols[i]->wdp_uri, WDP_DEVICE_TYPE, ((struct qname *)value)->ns, ((struct qname *)value)->lname))
return DPWS_OK;
}
Message  ↓
Date: 2014-02-12 15:50
Sender: Stéphane ROUGES

Fixed in trunk by looping on the exact number of protocols instead of N_DPWS_VERSIONS. Note that the bug could be detected only if a user type has a local name equal to "device" (else namespace if not event tested).

Field Old Value Date By
ResolutionAccepted As Bug2014-02-12 15:50srouges