Skip to content

Fix misleading comments in SHA-crypt and derived code#5962

Open
dchidindu5 wants to merge 2 commits intoopenwall:bleeding-jumbofrom
dchidindu5:error-message
Open

Fix misleading comments in SHA-crypt and derived code#5962
dchidindu5 wants to merge 2 commits intoopenwall:bleeding-jumbofrom
dchidindu5:error-message

Conversation

@dchidindu5
Copy link

Cross checked and fixed the following modules for duplicate comments that does not reflect the action of the code.

./sm3crypt_fmt_plug.c:		/* For every character in the password add the entire password. */
./sm3crypt_fmt_plug.c:		/* For every character in the password add the entire password. */
./sha512crypt_fmt_plug.c:			/* For every character in the password add the entire password.  */
./ztex/fpga-sha512crypt/sha512crypt/cpu/program.vh:	// "For every character in the password add the entire password."
./ztex/fpga-sha256crypt/sha256crypt/cpu/program.vh:	// "For every character in the password add the entire password."
./sha256crypt_fmt_plug.c:			/* For every character in the password add the entire password.  */
./gost12256hash_fmt_plug.c:		/* For every character in the password add the entire password. */
./gost12256hash_fmt_plug.c:		/* For every character in the password add the entire password. */
./gost12512hash_fmt_plug.c:		/* For every character in the password add the entire password.  */
./gost94hash_fmt_plug.c:		/* For every character in the password add the entire password. */
./gost94hash_fmt_plug.c:		/* For every character in the password add the entire password. */

@solardiz solardiz changed the title Fix Misleading Comments Fix misleading comments in SHA-crypt and derived code Mar 14, 2026
@solardiz
Copy link
Member

Thanks.

The comments changes themselves look good to me. I see the wording resembles what's already used in these files:

./sha512crypt_fmt_plug.c:			/* repeat the following 16+A[0] times, where A[0] represents the
./sha256crypt_fmt_plug.c:			/* repeat the following 16+A[0] times, where A[0] represents the
./gost12512hash_fmt_plug.c:		/* repeast the following 16+A[0] times, where A[0] represents the

While at it, I also notice the typo in repeast there. You may fix this as well.

However, the commits here need to be revised. For the commit message, I suggest:

Fix misleading comments in SHA-crypt and derived code

Fixes #5951

There should be no technical/irrelevant history here. No merge commit of bleeding-jumbo into your branch - instead, your branch should have been rebased and force-pushed.

I could take care of this by squash-and-merge this time, but if this whole exercise is to practice for your further contributions then you may want to do it right already for this PR, I guess?

@dchidindu5
Copy link
Author

dchidindu5 commented Mar 15, 2026 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants