PERFORCE change 123858 for review

Fredrik Lindberg fli at FreeBSD.org
Sat Jul 21 19:20:16 UTC 2007


http://perforce.freebsd.org/chv.cgi?CH=123858

Change 123858 by fli at fli_nexus on 2007/07/21 19:19:49

	- Check if argument is NULL before trying to copy it.

Affected files ...

.. //depot/projects/soc2007/fli-mdns_sd/mdnsd/event.c#7 edit

Differences ...

==== //depot/projects/soc2007/fli-mdns_sd/mdnsd/event.c#7 (text+ko) ====

@@ -416,7 +416,8 @@
 		 * properly passed to remove_event() once the event
 		 * can be removed.
 		 */
-		memcpy(&ev->ev_init_arg, arg, sizeof(ev_arg));
+		if (arg != NULL)
+			memcpy(&ev->ev_init_arg, arg, sizeof(ev_arg));
 		RW_UNLOCK(ev, ev_lock);
 	}
 


More information about the p4-projects mailing list