File: 0005-FAPI-Fix-wrong-format-directive-in-ifap_set_auth.patch

package info (click to toggle)
tpm2-tss 4.1.3-1.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 13,460 kB
  • sloc: ansic: 160,641; makefile: 920; sh: 649; xml: 431; python: 239
file content (15 lines) | stat: -rw-r--r-- 768 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Author: Juergen Repp <juergen_repp@web.de>
Description: FAPI: Fix wrong format directive in ifap_set_auth
 %u was used for a 16 bit unsigned integer and %lu for sizeof.
Origin: upstream,commit:4e2fe02fca8409f875a8693ece06b8b5e5baf5ce
--- a/src/tss2-fapi/fapi_util.c
+++ b/src/tss2-fapi/fapi_util.c
@@ -441,7 +441,7 @@
         if (auth != NULL) {
             authValue.size = strlen(auth);
             if (authValue.size > sizeof(TPMU_HA)) {
-                return_error2(TSS2_FAPI_RC_BAD_VALUE, "Size of auth value %u > %lu",
+                return_error2(TSS2_FAPI_RC_BAD_VALUE, "Size of auth value %"PRIu16" > %zu",
                               authValue.size, sizeof(TPMU_HA));
             }
             memcpy(&authValue.buffer[0], auth, authValue.size);