fix --block handling with invalid paths
The rootdev program was printing the path buffer even when the library
call failed. In that case, the buffer most likely is uninitialized.
Make sure we seed it with a NUL byte so it's always valid.
BUG=chromium:441571
TEST=`FEATURES=test emerge-link rootdev` passes
Change-Id: I00d334376de9bedee0a3fac3b1a74e48237c06b7
Reviewed-on: https://chromium-review.googlesource.com/234920
Trybot-Ready: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Yunlian Jiang <yunlian@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
1 file changed