HomeClusterLabs Projects

Fix: snprintf: use sizeof(X) as size + prevent off-by-ones

Description

Fix: snprintf: use sizeof(X) as size + prevent off-by-ones

Being unnecessarily pesimistic snprintf target sizing may lead to
unwarranted memory consumption.

At that opportunity, also remove superfluous initial string
initialization/termination in two affected instances.

Details

Provenance
Jan Pokorný <jpokorny@redhat.com>Authored on Feb 15 2017, 7:06 AM
kgaillotCommitted on Sep 22 2017, 6:14 PM
Parents
rPa2a52b9f8fa1: Low: crmd,libcrmcommon,libcluster,tools: handle PID as string properly
Branches
Unknown
Tags
Unknown

Event Timeline