Hi all,
I found a bug in nic_query_address function when a NULL is passed to
nic_data parameter. I try to fix it, let me know what do you think.
Best regards,
Manuele
=== modified file 'uspace/lib/nic/src/nic_driver.c'
--- uspace/lib/nic/src/nic_driver.c	2015-08-23 12:50:23 +0000
+++ uspace/lib/nic/src/nic_driver.c	2016-03-18 09:10:15 +0000
@@ -484,9 +484,10 @@
 void nic_query_address(nic_t *nic_data, nic_address_t *addr) {
 	if (!addr)
 		return;
-	if (!nic_data)
+	if (!nic_data) {
 		memset(addr, 0, sizeof(nic_address_t));
-
+		return;
+	}
 	memcpy(addr, &nic_data->mac, sizeof(nic_address_t));
 };
 

_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/listinfo/helenos-devel

Reply via email to