[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-cpio] cpio segfaulting when using -E
From: |
Sergey Poznyakoff |
Subject: |
Re: [Bug-cpio] cpio segfaulting when using -E |
Date: |
Thu, 02 Sep 2010 23:25:57 +0300 |
TBSDY <address@hidden> ha escrit:
> I'm running cpio 2.10
> If you run the following, then cpio segfaults:
> cpio -E no_such_file -t
> The problem is actually in .../lib/error.c, in open_error(...).
Thanks for reporting.
> the function call_arg_error(...) it never actually exits. I'm
> fairly certain that it's meant to be calling on
> call_arg_fatail(...).
Nope, that would break all other usages of this function. What *was*
intended was that read_pattern_file should have called open_fatal
instead, i.e.:
diff --git a/src/copyin.c b/src/copyin.c
index d41b17f..22e33dc 100644
--- a/src/copyin.c
+++ b/src/copyin.c
@@ -866,7 +866,7 @@ read_pattern_file ()
pattern_fp = fopen (pattern_file_name, "r");
if (pattern_fp == NULL)
- open_error (pattern_file_name);
+ open_fatal (pattern_file_name);
while (ds_fgetstr (pattern_fp, &pattern_name, '\n') != NULL)
{
if (new_num_patterns >= max_new_patterns)
which is the fix I'm going to push.
Regards,
Sergey