http://git.etherboot.org
/
people
/
xl0
/
gpxe.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1bc3514
)
Catch attempts to print NULL strings
author
Michael Brown
<mcb30@etherboot.org>
Tue, 19 Dec 2006 22:33:42 +0000
(22:33 +0000)
committer
Michael Brown
<mcb30@etherboot.org>
Tue, 19 Dec 2006 22:33:42 +0000
(22:33 +0000)
src/core/vsprintf.c
patch
|
blob
|
history
diff --git
a/src/core/vsprintf.c
b/src/core/vsprintf.c
index
42bd510
..
e225d48
100644
(file)
--- a/
src/core/vsprintf.c
+++ b/
src/core/vsprintf.c
@@
-219,6
+219,8
@@
size_t vcprintf ( struct printf_context *ctx, const char *fmt, va_list args ) {
cputchar ( ctx, va_arg ( args, unsigned int ) );
} else if ( *fmt == 's' ) {
ptr = va_arg ( args, char * );
+ if ( ! ptr )
+ ptr = "<NULL>";
} else if ( *fmt == 'p' ) {
intptr_t ptrval;