#4379 new defect

crypt-sha512.c: Constant variable guards dead code

Reported by: Ryan Long Owned by:
Priority: normal Milestone: Indefinite
Component: lib Version: 6
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description

CID 1018087: Constant variable guards dead code in crypt_sha512_r().

   assignment: Assigning: copied_salt = NULL.
 77        copied_salt = NULL;
.
.
.
276                memset(copied_key, '\0', key_len);
   null: At condition copied_salt != NULL, the value of copied_salt must be NULL.
   dead_error_condition: The condition copied_salt != NULL cannot be true.
277        if (copied_salt != NULL)

CID 1018088: Constant variable guards dead code in crypt_sha512_r().

 75
   assignment: Assigning: copied_key = NULL.
 76        copied_key = NULL;
.
.
.
274        memset(&alt_ctx, '\0', sizeof(alt_ctx));
   null: At condition copied_key != NULL, the value of copied_key must be NULL.
   dead_error_condition: The condition copied_key != NULL cannot be true.
275        if (copied_key != NULL)

Change History (2)

comment:1 Changed on 04/07/21 at 13:05:48 by Ryan Long

These variables/checks are no longer in this code according to the source code of the latest stable release https://cgit.freebsd.org/src/tree/lib/libcrypt/crypt-sha512.c?h=stable/13#n71.

comment:2 Changed on 12/16/21 at 20:48:15 by Ryan Long

Milestone: 6.1Indefinite
Note: See TracTickets for help on using tickets.