svn commit: trunk/busybox/editors

aldot at busybox.net aldot at busybox.net
Thu Oct 27 06:59:07 UTC 2005


Author: aldot
Date: 2005-10-26 23:59:05 -0700 (Wed, 26 Oct 2005)
New Revision: 11927

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


Modified:
   trunk/busybox/editors/patch.c


Changeset:
Modified: trunk/busybox/editors/patch.c
===================================================================
--- trunk/busybox/editors/patch.c	2005-10-27 00:57:50 UTC (rev 11926)
+++ trunk/busybox/editors/patch.c	2005-10-27 06:59:05 UTC (rev 11927)
@@ -3,7 +3,7 @@
  *  busybox patch applet to handle the unified diff format.
  *  Copyright (C) 2003 Glenn McGrath <bug1 at iinet.net.au>
  *
- *  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 @@
 		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 {




More information about the busybox-cvs mailing list