Skip to content

Commit

Permalink
Fix for directive output may be truncated on Win where PATH_MAX is …
Browse files Browse the repository at this point in the history
…260, not 1024.
  • Loading branch information
dgarske committed Oct 18, 2023
1 parent 172dc94 commit f5d9c62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/keytools/sign.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f5d9c62

Please sign in to comment.