We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 34bbd68 commit d5a6502Copy full SHA for d5a6502
lib/salt.c
@@ -443,12 +443,8 @@ static /*@observer@*/const char *gensalt (size_t salt_size)
443
444
return retval;
445
#else /* USE_XCRYPT_GENSALT */
446
- /* Check if the result buffer is long enough. */
447
- assert (GENSALT_SETTING_SIZE > strlen (result) + salt_len);
448
449
- /* Concatenate a pseudo random salt. */
450
- strncat (result, gensalt (salt_len),
451
- GENSALT_SETTING_SIZE - strlen (result) - 1);
+ assert(STRTCAT(result, gensalt(salt_len)) != -1);
452
453
return result;
454
#endif /* USE_XCRYPT_GENSALT */
0 commit comments