PR Review

1. Change the block size in the key decoding to a named constant rather
   than a bare number.
2. Change the comparison from a difference of two unsigned values
   against zero to comparing them directly.
pull/604/head
John Safranek 2023-11-03 14:24:28 -07:00
parent 3b443c01fc
commit 23a9bb82a0
1 changed files with 2 additions and 2 deletions

View File

@ -1239,8 +1239,8 @@ static int GetOpenSshKey(WS_KeySignature *key,
* and the length of the comment delimit the end of the
* encrypted blob. No added padding required. */
if (ret == WS_SUCCESS) {
if (strSz % 8 == 0) {
if (strSz - subIdx > 0) {
if (strSz % MIN_BLOCK_SZ == 0) {
if (strSz > subIdx) {
/* The padding starts at 1. */
check2 = strSz - subIdx;
for (check1 = 1;