-/* $OpenBSD: snmp.c,v 1.14 2014/04/14 12:58:04 blambert Exp $ */
+/* $OpenBSD: snmp.c,v 1.15 2014/04/20 16:23:33 reyk Exp $ */
/*
* Copyright (c) 2008 Reyk Floeter <reyk@openbsd.org>
bzero(&sun, sizeof(sun));
sun.sun_family = AF_UNIX;
- strlcpy(sun.sun_path, env->sc_snmp_path, sizeof(sun.sun_path));
+ if (strlcpy(sun.sun_path, env->sc_snmp_path,
+ sizeof(sun.sun_path)) >= sizeof(sun.sun_path))
+ fatalx("invalid socket path");
socket_set_blockmode(s, BM_NONBLOCK);