Skip to content

Commit

Permalink
strnlen isn't necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed May 10, 2013
1 parent 9137834 commit 922050e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/modules/rlm_idn/rlm_idn.c
Expand Up @@ -112,7 +112,9 @@ static size_t xlat_idna(void *instance, UNUSED REQUEST *request, char const *fmt
return 0;
}

len = strnlen(idna, 254); /* 253 is max DNS length */
len = strlen(idna);

/* 253 is max DNS length */
if (!((len < (freespace - 1)) && (len <= 253))) {
/* Never provide a truncated result, as it may be queried. */
RERROR("Conversion was truncated");
Expand Down

0 comments on commit 922050e

Please sign in to comment.