containers / composefs

The reliability of disk images, the flexibility of files
Other
446 stars 34 forks source link

writer: Fix (almost certainly unreachable) overflow #247

Closed cgwalters closed 9 months ago

cgwalters commented 9 months ago

A static analyzer warned about us potentially overflowing here, which I don't think is actually possible because readlink should never return a size greater than PATH_MAX.

Nevertheless, fix the math.

Note this is another bug that Wouldn't Happen in Rust.