Prevent possible infinite loop on a malformed buffer_t
Prevent possible infinite loop on a malformed buffer_t

If the buffer was all-zeros, this could have looped forever.


Former-commit-id: e03d50779443e88f2e2b9f82b71ffe8b292774cf
darkbuck/Halide,darkbuck/Halide,darkbuck/Halide,Trass3r/Halide,Trass3r/Halide,Trass3r/Halide,Trass3r/Halide,darkbuck/Halide,Trass3r/Halide,darkbuck/Halide,darkbuck/Halide,Trass3r/Halide,Trass3r/Halide,darkbuck/Halide