X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=mono%2Futils%2Fmono-networkinterfaces.c;h=f86bd651ee74be0b7507e7743a6bf4e1873a70ac;hb=45d90b20b7fb92adbeaf9a711cade5489ebeee42;hp=d253bd07b4a60b38f14f149a5f6ca77fde423154;hpb=0b4bc83e79ca3057693089dc7f926004bb9d9592;p=mono.git diff --git a/mono/utils/mono-networkinterfaces.c b/mono/utils/mono-networkinterfaces.c index d253bd07b4a..f86bd651ee7 100644 --- a/mono/utils/mono-networkinterfaces.c +++ b/mono/utils/mono-networkinterfaces.c @@ -1,3 +1,7 @@ +/** + * \file + */ + #include "config.h" #include "utils/mono-networkinterfaces.h" @@ -9,10 +13,9 @@ /** * mono_networkinterface_list: - * @size: a pointer to a location where the size of the returned array is stored - * - * Return an array of names for the interfaces currently on the system. - * The size of the array is stored in @size. + * \param size a pointer to a location where the size of the returned array is stored + * \returns an array of names for the interfaces currently on the system. + * The size of the array is stored in \p size. */ gpointer* mono_networkinterface_list (int *size) @@ -63,11 +66,10 @@ mono_networkinterface_list (int *size) /** * mono_network_get_data: - * @name: name of the interface - * @data: description of data to return - * - * Return a data item of a network adapter like bytes sent per sec, etc - * according to the @data argumet. + * \param name name of the interface + * \param data description of data to return + * \return a data item of a network adapter like bytes sent per sec, etc + * according to the \p data argumet. */ gint64 mono_network_get_data (char* name, MonoNetworkData data, MonoNetworkError *error) @@ -97,9 +99,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;