Project: datamanagement
Issue DM-7009: std::string construction from NULL pointer in ctrl_events
I was browsing through ctrl_events package and found couple of instances in the headers where std::string instance is constructed from NULL pointer: https://github.com/lsst/ctrl_events/blob/master/include/lsst/ctrl/events/Receiver.h#L87 https://github.com/lsst/ctrl_events/blob/master/include/lsst/ctrl/events/Transmitter.h#L81 I suspect that this code is never executed and those methods are overridden in subclasses because that construct will very likely crash when executed (std::string does not support construction from zero pointer, it will try to read from that pointer). Even if it's not executed it's better to change to return empty string or, if those two classes are never instantiated, make them abstract and make the methods pure virtual.
Story points: 1