Skip to content

Commit f697d50

Browse files
committed
fix the buffer overrun possibility posted on the original github:
Closed the gate for buffer overrun#188 trusteddomainproject#188
1 parent 93cda31 commit f697d50

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

libopendmarc/opendmarc_util.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ opendmarc_util_cleanup(char *str, char *buf, size_t buflen)
160160
{
161161
char *sp, *ep;
162162

163-
if (str == NULL || buf == NULL || strlen(str) > buflen)
163+
if (str == NULL || buf == NULL || strlen(str) >= buflen)
164164
{
165165
errno = EINVAL;
166166
return NULL;

0 commit comments

Comments
 (0)