Catch bz802242 artifical zero size file segfault
This commit is contained in:
parent
ba6984504e
commit
ef7e3b7e94
@ -65,7 +65,7 @@ namespace {
|
||||
if (r)
|
||||
throw runtime_error("Couldn't stat dev path");
|
||||
|
||||
if (S_ISREG(info.st_mode))
|
||||
if (S_ISREG(info.st_mode) && info.st_size)
|
||||
nr_blocks = div_up<block_address>(info.st_size, MD_BLOCK_SIZE);
|
||||
|
||||
else if (S_ISBLK(info.st_mode)) {
|
||||
|
Loading…
Reference in New Issue
Block a user