Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F131776638
D14521.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
737 B
Referenced Files
None
Subscribers
None
D14521.diff
View Options
Index: head/sys/libkern/iconv.c
===================================================================
--- head/sys/libkern/iconv.c
+++ head/sys/libkern/iconv.c
@@ -413,11 +413,11 @@
return EINVAL;
if (din.ia_datalen > ICONV_CSMAXDATALEN)
return EINVAL;
- if (strlen(din.ia_from) >= ICONV_CSNMAXLEN)
+ if (strnlen(din.ia_from, sizeof(din.ia_from)) >= ICONV_CSNMAXLEN)
return EINVAL;
- if (strlen(din.ia_to) >= ICONV_CSNMAXLEN)
+ if (strnlen(din.ia_to, sizeof(din.ia_to)) >= ICONV_CSNMAXLEN)
return EINVAL;
- if (strlen(din.ia_converter) >= ICONV_CNVNMAXLEN)
+ if (strnlen(din.ia_converter, sizeof(din.ia_converter)) >= ICONV_CNVNMAXLEN)
return EINVAL;
if (iconv_lookupconv(din.ia_converter, &dcp) != 0)
return EINVAL;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Oct 12, 2:06 AM (9 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
23603227
Default Alt Text
D14521.diff (737 B)
Attached To
Mode
D14521: iconv uses strlen directly on user supplied memory
Attached
Detach File
Event Timeline
Log In to Comment