just in case, let's not write garbled crap to the TTY but escape and
potential weird chars before output.
#include "analyze-chid.h"
#include "chid-fundamental.h"
#include "efi-api.h"
+#include "escape.h"
#include "fd-util.h"
#include "fileio.h"
#include "format-table.h"
_cleanup_free_ char *c = NULL;
if (smbios_fields[f]) {
- c = utf16_to_utf8(smbios_fields[f], SIZE_MAX);
+ _cleanup_free_ char *u = NULL;
+
+ u = utf16_to_utf8(smbios_fields[f], SIZE_MAX);
+ if (!u)
+ return log_oom();
+
+ c = cescape(u);
if (!c)
return log_oom();
}