]> git.ipfire.org Git - thirdparty/git.git/blobdiff - contrib/scalar/scalar.c
scalar-diagnose: avoid 32-bit overflow of size_t
[thirdparty/git.git] / contrib / scalar / scalar.c
index 97e71fe19cd5e503a19241439e21e1dbdcbc0e35..040464522841f17411e62ec42fc5fad9083efcf7 100644 (file)
@@ -348,7 +348,7 @@ static int get_disk_info(struct strbuf *out)
        }
 
        strbuf_addf(out, "Available space on '%s': ", buf.buf);
-       strbuf_humanise_bytes(out, st_mult(stat.f_bsize, stat.f_bavail));
+       strbuf_humanise_bytes(out, (off_t)stat.f_bsize * (off_t)stat.f_bavail);
        strbuf_addf(out, " (mount flags 0x%lx)\n", stat.f_flag);
        strbuf_release(&buf);
 #endif