projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3b83509
)
efi/printf: Fix minor bug in precision handling
author
Arvind Sankar
<nivedita@alum.mit.edu>
Mon, 18 May 2020 19:07:01 +0000
(15:07 -0400)
committer
Ard Biesheuvel
<ardb@kernel.org>
Tue, 19 May 2020 08:31:25 +0000
(10:31 +0200)
A negative precision should be ignored completely, and the presence of a
valid precision should turn off the 0 flag.
Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Link:
https://lore.kernel.org/r/20200518190716.751506-10-nivedita@alum.mit.edu
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
drivers/firmware/efi/libstub/vsprintf.c
patch
|
blob
|
history
diff --git
a/drivers/firmware/efi/libstub/vsprintf.c
b/drivers/firmware/efi/libstub/vsprintf.c
index
fb9eb83
..
00123d5
100644
(file)
--- a/
drivers/firmware/efi/libstub/vsprintf.c
+++ b/
drivers/firmware/efi/libstub/vsprintf.c
@@
-279,9
+279,11
@@
int vsprintf(char *buf, const char *fmt, va_list args)
++fmt;
/* it's the next argument */
precision = va_arg(args, int);
- }
- if (precision < 0)
+ } else {
precision = 0;
+ }
+ if (precision >= 0)
+ flags &= ~ZEROPAD;
}
/* get the conversion qualifier */