← Commit list

b32b1db9d

"Vladimir N. Oleynik"
"Vladimir N. Oleynik"
2005-10-15
SOURCE BUG Duration: 11s

Subject

complex RESERVE_CONFIG_BUFFER --> bb_common_bufsiz1

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 (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

sysklogd/syslogd.c+8 -5
@@ -600,16 +600,19 @@ static void doSyslogd(void)
if (FD_ISSET(sock_fd, &fds)) {
int i;
+#if MAXLINE > BUFSIZ
+# define TMP_BUF_SZ BUFSIZ
+#else
+# define TMP_BUF_SZ MAXLINE
+#endif
+#define tmpbuf bb_common_bufsiz1
- RESERVE_CONFIG_BUFFER(tmpbuf, MAXLINE + 1);
-
- memset(tmpbuf, '\0', MAXLINE + 1);
- if ((i = recv(sock_fd, tmpbuf, MAXLINE, 0)) > 0) {
+ if ((i = recv(sock_fd, tmpbuf, TMP_BUF_SZ, 0)) > 0) {
+ tmpbuf[i] = '\0';
serveConnection(tmpbuf, i);
} else {
bb_perror_msg_and_die("UNIX socket error");
}
- RELEASE_CONFIG_BUFFER(tmpbuf);
} /* FD_ISSET() */
} /* for main loop */
}