projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
294254c
)
rfelker writes in Bug 742: make sure string is null terminated after calling gethostname
author
Mike Frysinger
<vapier@gentoo.org>
Sun, 19 Feb 2006 23:03:31 +0000
(23:03 -0000)
committer
Mike Frysinger
<vapier@gentoo.org>
Sun, 19 Feb 2006 23:03:31 +0000
(23:03 -0000)
libbb/login.c
patch
|
blob
|
history
diff --git
a/libbb/login.c
b/libbb/login.c
index 3f67a819a947f82e67a97870c32876e12ff26522..2d6162564ec12b71849290d27b000ea3056d40d9 100644
(file)
--- a/
libbb/login.c
+++ b/
libbb/login.c
@@
-96,6
+96,7
@@
void print_login_issue(const char *issue_file, const char *tty)
case 'h':
gethostname(buf, sizeof(buf) - 1);
+ buf[sizeof(buf) - 1] = '\0';
break;
case 'l':
@@
-105,7
+106,7
@@
void print_login_issue(const char *issue_file, const char *tty)
default:
buf[0] = c;
}
- }
+
}
fputs(outbuf, stdout);
}