Check if width is zero or negative before fill; fix #3347

Reported by https://hackerone.com/haquaman.
parent 2edf15be
......@@ -720,10 +720,10 @@ retry:
CHECK(n);
memcpy(buf+blen, c, n);
blen += n;
FILL(' ', width-1);
if (width>0) FILL(' ', width-1);
}
else {
FILL(' ', width-1);
if (width>0) FILL(' ', width-1);
CHECK(n);
memcpy(buf+blen, c, n);
blen += n;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment