Infinite loop with directories named "0"

From: Joachim Achtzehnter <joachim@kraut.ca>
Date: Fri Oct 11 2002 - 00:41:22 GMT

The function common_path_prefix used by cvs2cl.pl tries to test for a
non-empty string by simply relying on "" being considered false.
Unfortunately, the string "0" is also considered false. This results in an
infinite loop when a directory component is named "0".

Basically these two lines:

    $accum1 .= "$tmp1/" if ((defined ($tmp1)) and $tmp1);
    $accum2 .= "$tmp2/" if ((defined ($tmp2)) and $tmp2);

must be replaced with something like this:

    $accum1 .= "$tmp1/" if ((defined ($tmp1)) and $tmp1 ne "");
    $accum2 .= "$tmp2/" if ((defined ($tmp2)) and $tmp2 ne "");

Regards, Joachim

-- 
work:     joachima@netacquire.com   (http://www.netacquire.com)
private:  joachim@kraut.ca          (http://www.kraut.ca)
Received on Fri Oct 11 08:54:34 2002

This archive was generated by hypermail 2.1.8 : Wed Jan 21 2004 - 16:25:33 GMT