]> Zhao Yanbai Git Server - minix.git/commitdiff
vfs: terminate string in rdlink_direct
authorArun Thomas <arun@minix3.org>
Wed, 1 Dec 2010 16:24:50 +0000 (16:24 +0000)
committerArun Thomas <arun@minix3.org>
Wed, 1 Dec 2010 16:24:50 +0000 (16:24 +0000)
Fixes test56 when compiled with GCC.

servers/vfs/link.c

index 10bedb42ab099d765bd6258aeb2ff8954b579a8b..9be281c3672fe5d04b637494c41db46dfb2ba6b4 100644 (file)
@@ -293,6 +293,7 @@ struct fproc *rfp;
   else
        r = req_rdlink(vp->v_fs_e, vp->v_inode_nr, (endpoint_t) 0,
                                                link_path, PATH_MAX+1, 1);
+  if (r > 0) link_path[r] = '\0';
 
   put_vnode(vp);
   return r;