Index: corebootv3-printk_safe_strings/lib/vtxprintf.c
===================================================================
--- corebootv3-printk_safe_strings/lib/vtxprintf.c	(Revision 1157)
+++ corebootv3-printk_safe_strings/lib/vtxprintf.c	(Arbeitskopie)
@@ -16,6 +16,7 @@
 #define isdigit(c)	((c) >= '0' && (c) <= '9')
 #define is_digit isdigit
 #define isxdigit(c)	(((c) >= '0' && (c) <= '9') || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F'))
+#define isprint(c)	((c) == '\n' || ((c) >= ' ' && (c) <= '~'))
 
 static int skip_atoi(const char **s)
 {
@@ -87,7 +88,7 @@
 			tx_byte('0', arg), count++;
 		else if (base==16) {
 			tx_byte('0', arg), count++;
-			tx_byte(digits[33], arg), count++;
+			tx_byte('x', arg), count++;
 		}
 	}
 	if (!(type & LEFT))
@@ -194,9 +195,15 @@
 			s = va_arg(args, char *);
 			if (!s)
 				s = "<NULL>";
+			/* Catch almost-NULL pointers as well */
+			if ((size_t)s < 0x400)
+				s = "<almost NULL>";
 
 			len = strnlen(s, precision);
 
+			for (i = 0; i < len; ++i)
+				if (!isprint(*s[i]))
+					s = "<GARBAGE>";
 			if (!(flags & LEFT))
 				while (len < field_width--)
 					tx_byte(' ', arg), count++;
