[Bug 229641] /usr/bin/printf (so also internal printf in sh) ignores width and precision in %b format

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Jul 11 21:52:34 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229641

Jilles Tjoelker <jilles at FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|New                         |Open

--- Comment #3 from Jilles Tjoelker <jilles at FreeBSD.org> ---
This looks like a valid bug.

This change should have some tests. The printf utility already has tests so
adding tests for this bug seems appropriate.

The copy of the format string is unnecessary as `start` is already a copy.
Getting rid of it would also fix the bug that there is a memory leak if the
allocation for bfmt succeeds but the allocation for p fails.

(On another note, `start` can be a rather large allocation on the stack.
Ideally, no space would be reserved past the specifier such as b, c, s.)

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list