Skip to content

Commit

Permalink
Fix dereference after null check
Browse files Browse the repository at this point in the history
  • Loading branch information
Pro committed Jul 24, 2017
1 parent fc8f8b0 commit 3801041
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/server/ua_services_call.c
Expand Up @@ -68,10 +68,11 @@ Operation_CallMethod(UA_Server *server, UA_Session *session,
(const UA_MethodNode*)UA_NodeStore_get(server->nodestore, &request->methodId);
if(!methodCalled)
result->statusCode = UA_STATUSCODE_BADMETHODINVALID;
if(methodCalled->nodeClass != UA_NODECLASS_METHOD)
else if(methodCalled->nodeClass != UA_NODECLASS_METHOD)
result->statusCode = UA_STATUSCODE_BADNODECLASSINVALID;
if(!methodCalled->attachedMethod)
else if(!methodCalled->attachedMethod)
result->statusCode = UA_STATUSCODE_BADINTERNALERROR;

if(result->statusCode != UA_STATUSCODE_GOOD)
return;

Expand Down

0 comments on commit 3801041

Please sign in to comment.