diff -Nru /n/sources/plan9/sys/src/libndb/ndbhash.c /sys/src/libndb/ndbhash.c --- /n/sources/plan9/sys/src/libndb/ndbhash.c Tue Apr 4 18:14:50 2006 +++ /sys/src/libndb/ndbhash.c Sun Nov 6 00:00:00 2016 @@ -86,7 +86,7 @@ /* compare it to the database file */ strncpy(hf->attr, attr, sizeof(hf->attr)-1); - sprint(buf, "%s.%s", db->file, hf->attr); + snprint(buf, sizeof buf, "%s.%s", db->file, hf->attr); hf->fd = open(buf, OREAD); if(hf->fd >= 0){ hf->len = 0; diff -Nru /n/sources/plan9/sys/src/libndb/ndbipinfo.c /sys/src/libndb/ndbipinfo.c --- /n/sources/plan9/sys/src/libndb/ndbipinfo.c Fri Apr 18 03:22:18 2008 +++ /sys/src/libndb/ndbipinfo.c Sun Nov 6 00:00:00 2016 @@ -127,7 +127,7 @@ int masklen; t = nil; - sprint(netstr, "%I", net); + snprint(netstr, sizeof netstr, "%I", net); nt = ndbsearch(db, &s, "ip", netstr); while(nt != nil){ xt = ndbfindattr(nt, nt, "ipnet");