[hackers] [sbase] Fix wrong length for sethostname() || sin

From: <git_AT_suckless.org>
Date: Fri, 14 Feb 2014 16:13:23 +0100

commit 13cbb19adc79e567b122feecbc03eb8ff8a93054
Author: sin <sin_AT_2f30.org>
Date: Fri Feb 14 15:11:06 2014 +0000

    Fix wrong length for sethostname()
    
    This was messed up in the previous commit.

diff --git a/hostname.c b/hostname.c
index 4d068c8..7b9177a 100644
--- a/hostname.c
+++ b/hostname.c
_AT_@ -36,7 +36,7 @@ main(int argc, char *argv[])
                         eprintf("gethostname:");
                 puts(host);
         } else {
- if (sethostname(argv[0], sz + 1) < 0)
+ if (sethostname(argv[0], strlen(argv[0])) < 0)
                         eprintf("sethostname:");
         }
 
Received on Fri Feb 14 2014 - 16:13:23 CET

This archive was generated by hypermail 2.3.0 : Fri Feb 14 2014 - 16:24:24 CET