Skip to content

Commit

Permalink
cipher_null.c: add NULL check
Browse files Browse the repository at this point in the history
  • Loading branch information
rajeev-0 committed Mar 12, 2024
1 parent 8d8866a commit 5b91a3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion providers/implementations/ciphers/cipher_null.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ static int null_cipher(void *vctx, unsigned char *out, size_t *outl,
}
if (outsize < inl)
return 0;
if (in != out)
if (out != NULL && in != out)
memcpy(out, in, inl);
*outl = inl;
return 1;
Expand Down

0 comments on commit 5b91a3d

Please sign in to comment.