Isofs readlink() returns wrong length

Bruce Elliott (belliott@accessone.com)
Wed, 12 Nov 1997 00:57:38 -0800 (PST)


The readlink() function in the isofs filesystem returns a length that is
one too large. This causes a SIGSEGV in mkisofs if a CDROM is used as
the source with "includes" for making updates.

The following fixes this in 2.1.62. I don't know whether this problem
exists in 2.0.xx.

========================================================================
diff -Nru linux.rels/fs/isofs/symlink.c linux/fs/isofs/symlink.c
--- linux.rels/fs/isofs/symlink.c Fri Aug 15 10:14:21 1997
+++ linux/fs/isofs/symlink.c Tue Nov 11 01:51:51 1997
@@ -56,7 +56,7 @@
if (!pnt)
return 0;

- i = strlen(pnt)+1;
+ i = strlen(pnt);
if (i > buflen)
i = buflen;
if (copy_to_user(buffer, pnt, i))
========================================================================

B. D. Elliott bde@accessone.com (Seattle)