From owner-freebsd-bugs Wed Aug 16 11:37:35 1995 Return-Path: bugs-owner Received: (from majordom@localhost) by freefall.FreeBSD.org (8.6.11/8.6.6) id LAA20605 for bugs-outgoing; Wed, 16 Aug 1995 11:37:35 -0700 Received: from jli (jli.portland.or.us [199.2.111.1]) by freefall.FreeBSD.org (8.6.11/8.6.6) with SMTP id LAA20589 for ; Wed, 16 Aug 1995 11:37:33 -0700 Received: from cumulus by jli with uucp (Smail3.1.29.1 #3) id m0sinKj-0001bFC; Wed, 16 Aug 95 11:36 PDT Message-Id: To: bugs@freebsd.org Subject: realpath() doesn't terminate on symlink loops Date: Wed, 16 Aug 1995 11:15:22 -0700 From: Bill Trost Sender: bugs-owner@freebsd.org Precedence: bulk The following program hangs under both 2.0.0-SNAP950322 and 2.0.5. (No, I haven't looked at how to fix it -- sorry) #include #include main(int argc, char **argv) { char result[MAXPATHLEN]; char *f = "/tmp/loop.trost"; symlink(f, f); if (realpath(f, result) == 0) printf("We have a problem here, Houston: %s\n", result); else printf("path is %s\n", result); }