list_children_main: be robust against bad parent input

if there aren't enough '\0's, we could end up reading off the
end of the input buffer.  Don't.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>