From f5d9c62c2d82001a49df1b66113d408fb4c241a1 Mon Sep 17 00:00:00 2001 From: David Garske Date: Wed, 18 Oct 2023 09:37:47 -0700 Subject: [PATCH] Fix for `directive output may be truncated` on Win where PATH_MAX is 260, not 1024. --- tools/keytools/sign.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/keytools/sign.c b/tools/keytools/sign.c index e2c146213..f7ec12f53 100644 --- a/tools/keytools/sign.c +++ b/tools/keytools/sign.c @@ -1693,7 +1693,7 @@ int main(int argc, char** argv) char* tmpstr; const char* sign_str = "AUTO"; const char* hash_str = "SHA256"; - uint8_t buf[1024]; + uint8_t buf[PATH_MAX-32]; /* leave room to avoid "directive output may be truncated" */ uint8_t *pubkey = NULL; uint32_t pubkey_sz = 0; uint8_t *kbuf=NULL, *key_buffer;