X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Futils%2Fmono-networkinterfaces.c;h=fc5bcc966a7105f964abe575254493d9498aa50b;hb=ce166860ea51867004930efea92cb7c86178900f;hp=d253bd07b4a60b38f14f149a5f6ca77fde423154;hpb=0b4bc83e79ca3057693089dc7f926004bb9d9592;p=mono.git diff --git a/mono/utils/mono-networkinterfaces.c b/mono/utils/mono-networkinterfaces.c index d253bd07b4a..fc5bcc966a7 100644 --- a/mono/utils/mono-networkinterfaces.c +++ b/mono/utils/mono-networkinterfaces.c @@ -97,9 +97,8 @@ mono_network_get_data (char* name, MonoNetworkData data, MonoNetworkError *error char *ptr; buf [sizeof (buf) - 1] = 0; - /* FIXME: This might potentially cause a buffer overflow for cname. */ if ((ptr = strchr (buf, ':')) == NULL || - (*ptr++ = 0, sscanf (buf, "%s", cname) != 1)) + (*ptr++ = 0, sscanf (buf, "%250s", cname) != 1)) goto out; if (strcmp (name, cname) != 0) continue;