diff options
| author | R. Imura <imura@FreeBSD.org> | 2005-09-08 15:46:38 +0000 |
|---|---|---|
| committer | R. Imura <imura@FreeBSD.org> | 2005-09-08 15:46:38 +0000 |
| commit | 68ba4fe4a1c48e9b6d7d76f2120a114d023ffd59 (patch) | |
| tree | a440de5c06fc6f3bb08e0226b8f60421ef8721d5 /sys/libkern | |
| parent | 6038f5e8264b63267c0e60d79c622127fa1fc852 (diff) | |
Notes
Diffstat (limited to 'sys/libkern')
| -rw-r--r-- | sys/libkern/iconv.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/libkern/iconv.c b/sys/libkern/iconv.c index 389f21ac8c47..4751d4b72615 100644 --- a/sys/libkern/iconv.c +++ b/sys/libkern/iconv.c @@ -379,6 +379,12 @@ iconv_sysctl_add(SYSCTL_HANDLER_ARGS) return EINVAL; if (din.ia_datalen > ICONV_CSMAXDATALEN) return EINVAL; + if (strlen(din.ia_from) >= ICONV_CSNMAXLEN) + return EINVAL; + if (strlen(din.ia_to) >= ICONV_CSNMAXLEN) + return EINVAL; + if (strlen(din.ia_converter) >= ICONV_CNVNMAXLEN) + return EINVAL; if (iconv_lookupconv(din.ia_converter, &dcp) != 0) return EINVAL; error = iconv_register_cspair(din.ia_to, din.ia_from, dcp, NULL, &csp); |
