Skip to content
Snippets Groups Projects
Commit 8998c57b authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Fix warning reported by nelgin.

parent e20e51b7
No related branches found
No related tags found
No related merge requests found
Pipeline #5364 canceled
......@@ -78,9 +78,9 @@ check_pubkey(scfg_t *cfg, ushort unum, char *pkey, size_t pksz)
char pk[2048];
int pklen;
pklen = b64_decode(pk, sizeof(pk), tok, 0);
if (pklen != -1) {
if (pklen > 0) {
if ((pksz - 4) == pklen) {
if (memcmp(&pkey[4], pk, pklen) == 0) {
if (memcmp(&pkey[4], pk, (unsigned)pklen) == 0) {
fclose(sshkeys);
return true;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment