HomeClusterLabs Projects

Fix: tools: Prevent a potential memory problem in crm_resource.

Description

Fix: tools: Prevent a potential memory problem in crm_resource.

It's technically possible for len to be 0 here, which would mean that
strv would have no allocated size, which means that strv[0] would crash.
Practically, I don't think this would ever happen which is why I'm just
using an assertion here.

While I'm at it, use pcmk__str_empty a few more places nearby.

Details

Provenance
clumensAuthored on Oct 7 2020, 2:26 PM
Parents
rP4679797dea3a: Fix: fencer: Add an additional check to advance_topology_level.
Branches
Unknown
Tags
Unknown

Event Timeline