From de5c0067d38d161fcaf6b94236468517bc168324 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 25 Jul 2024 15:48:46 +0100 Subject: [PATCH] generator/states-newstyle.c: Don't sign extend escaped chars Fixes: commit 5dbfc418cb6176102634acea2256b2335520159c (cherry picked from commit 0d6c6bbb3386de3b60ab6c4831045f2b1896051b) --- generator/states-newstyle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generator/states-newstyle.c b/generator/states-newstyle.c index 8c483bd2..1e026a8a 100644 --- a/generator/states-newstyle.c +++ b/generator/states-newstyle.c @@ -159,7 +159,7 @@ handle_reply_error (struct nbd_handle *h) if (replylen > 0) { /* Since this message comes from the server, take steps to quote it. */ uint32_t i; - const char *msg = h->sbuf.or.payload.err_msg; + const unsigned char *msg = (unsigned char *) h->sbuf.or.payload.err_msg; fprintf (fp, ": "); for (i = 0; i < replylen; ++i) { -- 2.43.0