File fix_signedness.patch of Package libu2f-host.19616
diff --color -ruN libu2f-host-1.1.10-ori/src/u2f-host.c libu2f-host-1.1.10/src/u2f-host.c
--- libu2f-host-1.1.10-ori/src/u2f-host.c 2019-03-27 07:56:35.000000000 +0100
+++ libu2f-host-1.1.10/src/u2f-host.c 2021-05-05 19:03:28.128543464 +0200
@@ -117,7 +117,7 @@
}
sscanf (args_info.command_arg, "%hhx", &command);
rc =
- u2fh_sendrecv (devs, 0, command, challenge, chal_len - 1, out,
+ u2fh_sendrecv (devs, 0, command, (const unsigned char *)challenge, chal_len - 1, out,
&outlen);
}
break;
diff --color -ruN libu2f-host-1.1.10-ori/u2f-host/authenticate.c libu2f-host-1.1.10/u2f-host/authenticate.c
--- libu2f-host-1.1.10-ori/u2f-host/authenticate.c 2019-02-22 12:31:45.000000000 +0100
+++ libu2f-host-1.1.10/u2f-host/authenticate.c 2021-05-05 19:00:56.812254344 +0200
@@ -104,7 +104,7 @@
return U2FH_MEMORY_ERROR;
base64_init_encodestate (&b64ctx);
- cnt = base64_encode_block (buf, len, b64enc, &b64ctx);
+ cnt = base64_encode_block ((const char *)buf, len, b64enc, &b64ctx);
base64_encode_blockend (b64enc + cnt, &b64ctx);
base64_init_encodestate (&b64ctx);
@@ -158,7 +158,7 @@
base64_init_decodestate (&b64);
khlen = base64_decode_block (khb64, kh64len,
- data + HOSIZE + CHALLBINLEN + 1, &b64);
+ (char *)data + HOSIZE + CHALLBINLEN + 1, &b64);
data[HOSIZE + CHALLBINLEN] = khlen;
/* FIXME: Support asynchronous usage, through a new u2fh_cmdflags
diff --color -ruN libu2f-host-1.1.10-ori/u2f-host/register.c libu2f-host-1.1.10/u2f-host/register.c
--- libu2f-host-1.1.10-ori/u2f-host/register.c 2019-02-22 12:31:45.000000000 +0100
+++ libu2f-host-1.1.10/u2f-host/register.c 2021-05-05 18:57:59.923915542 +0200
@@ -88,7 +88,7 @@
return U2FH_MEMORY_ERROR;
base64_init_encodestate (&b64ctx);
- cnt = base64_encode_block (buf, len, b64resp, &b64ctx);
+ cnt = base64_encode_block ((const char *)buf, len, b64resp, &b64ctx);
base64_encode_blockend (b64resp + cnt, &b64ctx);
base64_init_encodestate (&b64ctx);