Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F154150417
D16314.id45585.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D16314.id45585.diff
View Options
Index: head/lib/libcrypt/crypt-sha256.c
===================================================================
--- head/lib/libcrypt/crypt-sha256.c
+++ head/lib/libcrypt/crypt-sha256.c
@@ -68,13 +68,10 @@
uint8_t alt_result[32], temp_result[32];
SHA256_CTX ctx, alt_ctx;
size_t salt_len, key_len, cnt, rounds;
- char *cp, *copied_key, *copied_salt, *p_bytes, *s_bytes, *endp;
+ char *cp, *p_bytes, *s_bytes, *endp;
const char *num;
bool rounds_custom;
- copied_key = NULL;
- copied_salt = NULL;
-
/* Default number of rounds. */
rounds = ROUNDS_DEFAULT;
rounds_custom = false;
@@ -244,10 +241,6 @@
memset(s_bytes, '\0', salt_len);
memset(&ctx, '\0', sizeof(ctx));
memset(&alt_ctx, '\0', sizeof(alt_ctx));
- if (copied_key != NULL)
- memset(copied_key, '\0', key_len);
- if (copied_salt != NULL)
- memset(copied_salt, '\0', salt_len);
return (0);
}
Index: head/lib/libcrypt/crypt-sha512.c
===================================================================
--- head/lib/libcrypt/crypt-sha512.c
+++ head/lib/libcrypt/crypt-sha512.c
@@ -68,13 +68,10 @@
uint8_t alt_result[64], temp_result[64];
SHA512_CTX ctx, alt_ctx;
size_t salt_len, key_len, cnt, rounds;
- char *cp, *copied_key, *copied_salt, *p_bytes, *s_bytes, *endp;
+ char *cp, *p_bytes, *s_bytes, *endp;
const char *num;
bool rounds_custom;
- copied_key = NULL;
- copied_salt = NULL;
-
/* Default number of rounds. */
rounds = ROUNDS_DEFAULT;
rounds_custom = false;
@@ -256,10 +253,6 @@
memset(s_bytes, '\0', salt_len);
memset(&ctx, '\0', sizeof(ctx));
memset(&alt_ctx, '\0', sizeof(alt_ctx));
- if (copied_key != NULL)
- memset(copied_key, '\0', key_len);
- if (copied_salt != NULL)
- memset(copied_salt, '\0', salt_len);
return (0);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Apr 27, 2:58 PM (21 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32229355
Default Alt Text
D16314.id45585.diff (1 KB)
Attached To
Mode
D16314: Get rid of unused variables.
Attached
Detach File
Event Timeline
Log In to Comment