Module Name: src Committed By: abs Date: Sun May 29 10:51:41 UTC 2022
Modified Files: src/lib/libcrypt: crypt-argon2.c Log Message: Free strdup'd value in libargon decode_option error paths If its worth freeing in the success path, its worth freeing in the error path... (given we don't _exit or similar) To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/lib/libcrypt/crypt-argon2.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libcrypt/crypt-argon2.c diff -u src/lib/libcrypt/crypt-argon2.c:1.16 src/lib/libcrypt/crypt-argon2.c:1.17 --- src/lib/libcrypt/crypt-argon2.c:1.16 Sun Feb 13 13:32:03 2022 +++ src/lib/libcrypt/crypt-argon2.c Sun May 29 10:51:41 2022 @@ -328,6 +328,7 @@ decode_option(argon2_context *ctx, argon } break; default: + free(in); return -1; } @@ -337,8 +338,10 @@ decode_option(argon2_context *ctx, argon sl = ctx->saltlen; - if (from_base64(ctx->salt, &sl, a) == NULL) + if (from_base64(ctx->salt, &sl, a) == NULL) { + free(in); return -1; + } ctx->saltlen = sl;