diff options
author | iedowse <iedowse@FreeBSD.org> | 2001-05-12 20:05:26 +0000 |
---|---|---|
committer | iedowse <iedowse@FreeBSD.org> | 2001-05-12 20:05:26 +0000 |
commit | bbc41cdbeb17497e002a4c8b712ca50dfeaaef31 (patch) | |
tree | c1234bc60209630fdcc2fbf188745b9455a48bdd /usr.bin/units/units.lib | |
parent | e7eaf34495f990eb932ae39a8e87baa3348277eb (diff) | |
download | FreeBSD-src-bbc41cdbeb17497e002a4c8b712ca50dfeaaef31.zip FreeBSD-src-bbc41cdbeb17497e002a4c8b712ca50dfeaaef31.tar.gz |
Extract the path from an AF_LOCAL sockaddr_un in a way that correctly
terminates the string in all cases, based on code from netstat(1).
The path in a sockaddr_un is terminated either by a '\0', or by
the end of the sockaddr as defined by sun_len.
Previously, the code could write the "safety" '\0' beyond the end
of the sockaddr (sockaddr_un's need only be large enough to store
sun_len bytes), and writing into the the supplied sockaddr is bad
anyway.
Diffstat (limited to 'usr.bin/units/units.lib')
0 files changed, 0 insertions, 0 deletions