Fixes a segfault (divide by zero in create_unique_file()).
Don't pass in a zero size into create_unique_file(), since
this function attempts to create and populate a file the
asked size (it also causes a division by zero error when
the size is zero).
Test: Run puncture_fs several times to cover case where
the random number generator returns value which would have
caused size to be 0 (tested with debug printf to catch
the case where we regenerated the random number).
Change-Id: I397b92e2bc1e9164bb2b2e474a7135f81fc30b23
Signed-off-by: Mohan Srinivasan <srmohan@google.com>
1 file changed