=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/readlink/readlink.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- src/usr.bin/readlink/readlink.c 1997/09/23 20:39:11 1.12 +++ src/usr.bin/readlink/readlink.c 1997/11/18 22:52:10 1.13 @@ -1,5 +1,5 @@ /* - * $OpenBSD: readlink.c,v 1.12 1997/09/23 20:39:11 niklas Exp $ + * $OpenBSD: readlink.c,v 1.13 1997/11/18 22:52:10 niklas Exp $ * * Copyright (c) 1997 * Kenneth Stailey (hereinafter referred to as the author) @@ -73,6 +73,7 @@ realpath(argv[0], buf); else if ((n = readlink(argv[0], buf, PATH_MAX)) < 0) exit(1); + buf[n] = '\0'; printf("%s", buf); if (!nflag)