Project

General

Profile

Actions

Bug #3736

open

cp -r shouldn't allow infinite loops

Added by Rich Lowe over 8 years ago. Updated about 8 years ago.

Status:
In Progress
Priority:
Normal
Assignee:
-
Category:
-
Start date:
2013-04-19
Due date:
% Done:

60%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

If you do

> mkdir foo
> cp -r . foo

cp will loop ever deeper, until you run out of file descriptors (which may indicate it's leaking them, I haven't checked if that's to be expected or not).

It should stop short, as GNU cp does (but BSD cp doesn't, that one runs out to PATH_MAX instead).


Files

diff (955 Bytes) diff Alexander Eremin, 2013-05-13 04:29 PM
Actions

Also available in: Atom PDF