FreeBSD Bugzilla – Attachment 195011 Details for
Bug 229641
/usr/bin/printf (so also internal printf in sh) ignores width and precision in %b format
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Possible fix
printf-bfix.diff (text/plain), 667 bytes, created by
Pedro F. Giffuni
on 2018-07-09 21:51:33 UTC
(
hide
)
Description:
Possible fix
Filename:
MIME Type:
Creator:
Pedro F. Giffuni
Created:
2018-07-09 21:51:33 UTC
Size:
667 bytes
patch
obsolete
>Index: usr.bin/printf/printf.c >=================================================================== >--- usr.bin/printf/printf.c (revision 336112) >+++ usr.bin/printf/printf.c (working copy) >@@ -374,14 +374,19 @@ > size_t len; > char *p; > int getout; >+ char *bfmt; > >- p = strdup(getstr()); >- if (p == NULL) { >+ if (((bfmt = strdup(start)) == NULL) || >+ ((p = strdup(getstr())) == NULL)) { > warnx("%s", strerror(ENOMEM)); > return (NULL); > } >+ /* Convert "b" to "s" for output. */ >+ bfmt[strlen(bfmt) - 1] = 's'; > getout = escape(p, 0, &len); >- fputs(p, stdout); >+ PF(bfmt, p); >+ >+ free(bfmt); > free(p); > if (getout) > return (end_fmt);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 229641
:
195011
|
195012
|
195131