ref: 219c3121638214be8f1d4750510729a058fe2c8e
parent: 391198888a71649067d10862db1f1afed2b69c90
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Apr 27 22:32:06 EDT 2014
libip: use snprint() in myetheraddr() to prevent accidents
--- a/sys/src/libip/myetheraddr.c
+++ b/sys/src/libip/myetheraddr.c
@@ -9,9 +9,9 @@
char buf[256];
if(*dev == '/' || *dev == '#')
- sprint(buf, "%s/addr", dev);
+ snprint(buf, sizeof buf, "%s/addr", dev);
else
- sprint(buf, "/net/%s/addr", dev);
+ snprint(buf, sizeof buf, "/net/%s/addr", dev);
fd = open(buf, OREAD);
if(fd < 0)