cpio/cpio-fix_truncation_check.patch

14 lines
420 B
Diff

Index: cpio-2.13/src/mt.c
===================================================================
--- cpio-2.13.orig/src/mt.c
+++ cpio-2.13/src/mt.c
@@ -208,7 +208,7 @@ parse_opt (int key, char *arg, struct ar
{
char *p;
long val = strtol (arg, &p, 0);
- if (*p || (count = val) != count)
+ if (*p || (count = val) != val)
error (MT_EXIT_INVOP, 0, _("invalid count value"));
}
break;