HomeClusterLabs Projects

Fix: crm_mon: protect against non-standard or failing asctime

This commit no longer exists in the repository. It may have been part of a branch which was deleted.

Description

Fix: crm_mon: protect against non-standard or failing asctime

So far, we have been likely covered by standards requiring asctime to
produce an output ending with \n\0 bytes, because otherwise, we would
overrun the buffer, reading unspecified content, possibly segfaulting.
This was actually discovered with a brand new GCC7 warning
( [-Werror=pointer-compare]).

Another latent issue was that the code was not ready for the case
of failing asctime call (returning NULL). This is now fixed as well.

Details

Provenance
Jan Pokorny <jpokorny@redhat.com>Authored on Feb 2 2017, 8:51 AM
Jan Pokorný <jpokorny@redhat.com>Committed on Feb 2 2017, 9:04 AM

Event Timeline

Commit No Longer Exists

This commit no longer exists in the repository.