]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
hostname: avoid strcpy() overlap in -d flag handling
authorKyle Evans <kevans@FreeBSD.org>
Sat, 25 Sep 2021 05:00:31 +0000 (00:00 -0500)
committerKyle Evans <kevans@FreeBSD.org>
Sun, 3 Oct 2021 05:19:56 +0000 (00:19 -0500)
commit47c84a0f6d6ece6f3d32a393a382e2a91544f421
treeab08b3d967e7a180665bb4a336ab90b3a52cd13f
parent00d0f1811b719c66ee91b9bf4680cfc0515e65aa
hostname: avoid strcpy() overlap in -d flag handling

We don't need the strcpy() anyways, just use a pointer to the hostname
buffer and move it forward for `hostname -d`.

Sponsored by: Klara, Inc.

(cherry picked from commit 33c1e7271ac21a626829289780b88071ae46ec65)
bin/hostname/hostname.c