In particular, '\r' was causing output corruption, and it's not
actually needed.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
*/
#include <xen/config.h>
+#include <xen/ctype.h>
#include <xen/init.h>
#include <xen/lib.h>
#include <xen/trace.h>
BUG_ON(bytes != 1);
+ /* Accept only printable characters, newline, and horizontal tab. */
+ if ( !isprint(c) && (c != '\n') && (c != '\t') )
+ return X86EMUL_OKAY;
+
spin_lock(&hd->pbuf_lock);
hd->pbuf[hd->pbuf_idx++] = c;
if ( (hd->pbuf_idx == (sizeof(hd->pbuf) - 2)) || (c == '\n') )