]> git.draconx.ca Git - slotifier.git/commit
Fix crash when input has no holes.
authorNick Bowler <nbowler@draconx.ca>
Wed, 14 Apr 2021 01:33:13 +0000 (21:33 -0400)
committerNick Bowler <nbowler@draconx.ca>
Wed, 14 Apr 2021 01:33:13 +0000 (21:33 -0400)
commitedd5c230afdc7341e5a5564d9c8ee714688705fe
treef7f2f3bfbbf362c8e547fab65080a3effdcdad5d
parent5c9f3276505a9cbe000842401cbf7dd132b48ccb
Fix crash when input has no holes.

When the search tree has no elements, it seems the CNearTreeObjects
function does not give a CVector with zero elements but rather a
null pointer.  This results in a null dereference when that is
passed to CVectorSize, instead of 0 as expected.

Add an explicit check for this case to avoid crashing.
src/slotifier.c
tests/simple.at