>From: yaroslav >Subject: [9fans] lpdaemon in /sys/src/cmd/lp/lpdaemon.c:297,310 These info.host[strlen(info.host)] = '\0'; … info.user[strlen(info.user)] = '\0'; look nonsence as zeros are placed exactly where they already are. Should read as in following instead: info.host[NAMELEN] = '\0'; … info.user[NAMELEN] = '\0'; Reference: /n/atom/patch/applied2013/lpdaemonnit Date: Wed Jun 5 15:03:03 CES 2013 Signed-off-by: quanstro@quanstro.net --- /sys/src/cmd/lp/lpdaemon.c Wed Jun 5 15:02:02 2013 +++ /sys/src/cmd/lp/lpdaemon.c Wed Jun 5 15:02:02 2013 @@ -299,14 +299,14 @@ strncpy(info.host, "unknown", NAMELEN); else strncpy(info.host, (const char *)&ap[1], NAMELEN); - info.host[strlen(info.host)] = '\0'; + info.host[NAMELEN] = '\0'; break; case 'P': if (ap[1] == '\0') strncpy(info.user, "unknown", NAMELEN); else strncpy(info.user, (const char *)&ap[1], NAMELEN); - info.user[strlen(info.user)] = '\0'; + info.user[NAMELEN] = '\0'; break; } }