Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DisplayCommandHandler::DisplayCommandHandler : potential crash #116

Open
iusyk opened this issue May 27, 2020 · 1 comment
Open

DisplayCommandHandler::DisplayCommandHandler : potential crash #116

iusyk opened this issue May 27, 2020 · 1 comment

Comments

@iusyk
Copy link
Collaborator

iusyk commented May 27, 2020

Description

The ctor DisplayCommandHandler::DisplayCommandHandler takes the followinf input parameters
-DisplayPtr display,
-ConnectorPtr connector,
-BuffersStoragePtr buffersStorage,
-EventRingBufferPtr eventBuffer
all of the parameters are the pointers (rather shared_ptr)
The problems

  1. parameters must be checked for a nullptr
  2. There is the following code
    LOG(mLog, DEBUG) << "Create command handler, connector name: "
    << mConnector->getName();
    Of course in the case of null pointer - this is crash

Solution

  1. check all parameters for a nullptr
  2. wrap the logging in block if(mConnector){}
iusyk added a commit to iusyk/displ_be that referenced this issue Jun 22, 2020
Reference:xen-troops#116

The assert(..) verification has been added to avoid the crash.

Signed-off-by: Ihor Usyk <[email protected]>
@iusyk
Copy link
Collaborator Author

iusyk commented Jun 22, 2020

fix #131

iusyk added a commit to iusyk/displ_be that referenced this issue Jun 24, 2020
Reference:xen-troops#116

The assert(..) verification has been added to avoid the crash.

Signed-off-by: Ihor Usyk <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant