[11/13] installer: Pass correct length of hostname to sethostname()

Message ID 20240405125942.1803058-11-michael.tremer@ipfire.org
State Staged
Commit fd0b10c92cdc87c56fb51a3316f12a0412278a4e
Headers
Series [01/13] installer: Update language files |

Commit Message

Michael Tremer April 5, 2024, 12:59 p.m. UTC
  Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
---
 src/installer/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/src/installer/main.c b/src/installer/main.c
index ecfcff2ec..6253df550 100644
--- a/src/installer/main.c
+++ b/src/installer/main.c
@@ -377,7 +377,7 @@  int main(int argc, char *argv[]) {
 	FILE *copying;
 
 	setlocale(LC_ALL, "");
-	sethostname(DISTRO_SNAME, 10);
+	sethostname(DISTRO_SNAME, strlen(DISTRO_SNAME));
 
 	/* Log file/terminal stuff. */
 	if (argc >= 2) {