[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Potential Null pointer dereference in tar 1.35

From: Martin Simmons
Subject: Re: Potential Null pointer dereference in tar 1.35
Date: Thu, 21 Sep 2023 20:17:13 +0100

>>>>> On Thu, 21 Sep 2023 09:33:57 -0700, Paul Eggert said:
> Could you please look at the current sources? That part of 'tar' has 
> changed significantly since 1.35, and I don't see a bug in the latest 
> version. If the bug's still there, please let us know.

The latest version looks correct to me too, but I think it would crash
if the final node in the chain has the _WSNF_JOIN flag.  If this is
supposed to be impossible, then the tests for non-NULL p at lines 571
and 575 are redundant and confusing.

   571    for (p = node; p && (p->flags & _WSNF_JOIN); p = p->next)
   572      {
   573        len += wsnode_len (p);
   574      }
   575    if (p)
   576      len += wsnode_len (p);
   577    end = p;


reply via email to

[Prev in Thread] Current Thread [Next in Thread]