Hi Pedro, 2018-01-27 23:16 GMT+01:00 Pedro F. Giffuni <p...@freebsd.org>: > char host[sizeof(utmp.ut_host) + 1]; > insecure = 1; > > - strncpy(host, utmp.ut_host, sizeof(utmp.ut_host)); > - host[sizeof(utmp.ut_host)] = 0; > + strncpy(host, utmp.ut_host, sizeof(host));
Wait... This may access utmp.ut_host one byte past the end and no longer guarantees that host is null-terminated, right? -- Ed Schouten <e...@nuxi.nl> Nuxi, 's-Hertogenbosch, the Netherlands _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"