Sun Feb 13 13:32:03 2022 UTC ()
remove dup assignments (RVP)


(christos)
diff -r1.15 -r1.16 src/lib/libcrypt/crypt-argon2.c

cvs diff -r1.15 -r1.16 src/lib/libcrypt/crypt-argon2.c (expand / switch to unified diff)

--- src/lib/libcrypt/crypt-argon2.c 2021/11/22 14:30:24 1.15
+++ src/lib/libcrypt/crypt-argon2.c 2022/02/13 13:32:03 1.16
@@ -376,29 +376,26 @@ __crypt_argon2(const char *pw, const cha @@ -376,29 +376,26 @@ __crypt_argon2(const char *pw, const cha
376 char encodebuf[256]; 376 char encodebuf[256];
377 /* argon2 salt buffer */ 377 /* argon2 salt buffer */
378 char saltbuf[128]; 378 char saltbuf[128];
379 /* argon2 pwd buffer */ 379 /* argon2 pwd buffer */
380 char pwdbuf[128]; 380 char pwdbuf[128];
381 /* returned static buffer */ 381 /* returned static buffer */
382 static char rbuf[512]; 382 static char rbuf[512];
383 383
384 /* clear buffers */ 384 /* clear buffers */
385 explicit_memset(rbuf, 0, sizeof(rbuf)); 385 explicit_memset(rbuf, 0, sizeof(rbuf));
386 386
387 /* we use static buffers to avoid allocation */ 387 /* we use static buffers to avoid allocation */
388 /* and easier cleanup */ 388 /* and easier cleanup */
389 ctx.out = (uint8_t *)ebuf; 
390 ctx.outlen = sizeof(ebuf); 
391 
392 ctx.out = (uint8_t *)encodebuf; 389 ctx.out = (uint8_t *)encodebuf;
393 ctx.outlen = sizeof(encodebuf); 390 ctx.outlen = sizeof(encodebuf);
394 391
395 ctx.salt = (uint8_t *)saltbuf; 392 ctx.salt = (uint8_t *)saltbuf;
396 ctx.saltlen = sizeof(saltbuf); 393 ctx.saltlen = sizeof(saltbuf);
397 394
398 ctx.pwd = (uint8_t *)pwdbuf; 395 ctx.pwd = (uint8_t *)pwdbuf;
399 ctx.pwdlen = sizeof(pwdbuf); 396 ctx.pwdlen = sizeof(pwdbuf);
400 397
401 /* decode salt string to argon2 params */ 398 /* decode salt string to argon2 params */
402 /* argon2 context for param collection */ 399 /* argon2 context for param collection */
403 rc = decode_option(&ctx, &atype, salt); 400 rc = decode_option(&ctx, &atype, salt);
404 401