← Commit list

ee9cf4862

Bernhard Reutner-Fischer
Bernhard Reutner-Fischer
2005-10-27
SOURCE BUG Duration: 9s

Subject

- correct boilerplate - use bb_xgetlarg for the patch_level to catch invalid arguments.

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 →

editors/patch.c+2 -2
@@ -3,7 +3,7 @@
* busybox patch applet to handle the unified diff format.
* Copyright (C) 2003 Glenn McGrath <[email protected]>
*
- * Licensed under the GPL v2, see the file LICENSE in this tarball.
+ * Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
*
* This applet is written to work with patches generated by GNU diff,
* where there is equivalent functionality busybox patch shall behave
@@ -99,7 +99,7 @@ extern int patch_main(int argc, char **argv)
char *p, *i;
ret = bb_getopt_ulflags(argc, argv, "p:i:", &p, &i);
if (ret & 1)
- patch_level = atoi(p);
+ patch_level = bb_xgetlarg(p, 10, -1, USHRT_MAX);
if (ret & 2) {
patch_file = bb_xfopen(i, "r");
} else {