Skip to content

Commit

Permalink
jwt-verify: Increase length of lines for reading stdin
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Collins <[email protected]>
  • Loading branch information
benmcollins committed Jan 12, 2025
1 parent 372513c commit 1b784bd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tools/jwt-verify.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

extern const char *__progname;

#define MAX_LINE_LENGTH 1024

_Noreturn static void usage(const char *error, int exit_state)
{
if (error)
Expand Down Expand Up @@ -212,8 +210,8 @@ int main(int argc, char *argv[])
err = 0;

if (!strcmp(argv[0], "-")) {
char token[MAX_LINE_LENGTH];
while (fgets(token, MAX_LINE_LENGTH, stdin) != NULL) {
char token[BUFSIZ];
while (fgets(token, sizeof(token), stdin) != NULL) {
token[strcspn(token, "\n")] = '\0';

err += process_one(checker, alg, token);
Expand Down

0 comments on commit 1b784bd

Please sign in to comment.