OpenDKIM
OpenDKIM copied to clipboard
patch to dkim.c:6092:49
dkim.c:6092:49: warning: size argument in 'strlcpy' call appears to be size
of the source; expected the size of the destination [-Wstrlcpy-strlcat-size]
strlcpy((char *) dkim->dkim_zdecode, z, strlen(z));
~~~~~~~^~
Proposed patch:
- strlcpy((char *) dkim->dkim_zdecode, z, strlen(z));
+ strlcpy((char *) dkim->dkim_zdecode, z, strlen(dkim->dkim_zdecode));
Hello Rupert,
I'm working on the new release. I'll review this along with the other issue as I go along.
-M
I think the original code is right, howewer unusual. In the proposed patch, sizeof() should be instead of strlen() on a freshly allocated memory area.