← Commit list

7673ccad6

"Vladimir N. Oleynik"
"Vladimir N. Oleynik"
2006-02-20
SOURCE BUG Duration: 3s

Subject

sync with mainstream, but check more

SOURCE BUG

This commit was genuinely broken at the time (not related to our build system): scripts/config/mkconfigs.c (2005-08-01 - 2006-10-05 arasi) uretilen bbconfigopts.h icine .config satirlarini kacissiz, ham newline'larla gömüyordu - gecerli C degildi, busybox'un kendi bb_mkdep araci bile parse edemiyordu (7d219aab7 ile duzeltildi, mkconfigs shell scripte cevrildi)

→ Bu hatanin tam hikayesini ve duzeltme diffini gor

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Debian 14.2.0-19) 14.2.0

—

Build Log

(log yok)

Commit Diff GitHub →

libbb/login.c+5 -5
@@ -37,7 +37,7 @@ void print_login_issue(const char *issue_file, const char *tty)
{
FILE *fd;
int c;
- char buf[256];
+ char buf[256+1];
const char *outbuf;
time_t t;
struct utsname uts;
@@ -82,8 +82,8 @@ void print_login_issue(const char *issue_file, const char *tty)
case 'D':
case 'o':
- getdomainname(buf, sizeof(buf));
- buf[sizeof(buf) - 1] = '\0';
+ c = getdomainname(buf, sizeof(buf) - 1);
+ buf[c >= 0 ? c : 0] = '\0';
break;
case 'd':
@@ -120,8 +120,8 @@ void print_login_prompt(void)
{
char buf[MAXHOSTNAMELEN+1];
- gethostname(buf, MAXHOSTNAMELEN);
- fputs(buf, stdout);
+ if(gethostname(buf, MAXHOSTNAMELEN) == 0)
+ fputs(buf, stdout);
fputs(LOGIN, stdout);
fflush(stdout);