Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Feb 2009 11:55:19 +0000 (UTC)
From:      Alexander Leidinger <netchild@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r188572 - head/sys/compat/linux
Message-ID:  <200902131155.n1DBtJJm087917@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: netchild
Date: Fri Feb 13 11:55:19 2009
New Revision: 188572
URL: http://svn.freebsd.org/changeset/base/188572

Log:
  Fix an edge-case of the linux readdir: We need the size of a linux dirent
  structure, not the size of a pointer to it.
  
  PR:		131099
  Submitted by:	Andreas Kies <andikies@gmail.com>
  MFC after:	2 weeks

Modified:
  head/sys/compat/linux/linux_file.c

Modified: head/sys/compat/linux/linux_file.c
==============================================================================
--- head/sys/compat/linux/linux_file.c	Fri Feb 13 11:36:32 2009	(r188571)
+++ head/sys/compat/linux/linux_file.c	Fri Feb 13 11:55:19 2009	(r188572)
@@ -345,7 +345,7 @@ getdents_common(struct thread *td, struc
 		/* readdir(2) case. Always struct dirent. */
 		if (is64bit)
 			return (EINVAL);
-		nbytes = sizeof(linux_dirent);
+		nbytes = sizeof(*linux_dirent);
 		justone = 1;
 	} else
 		justone = 0;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902131155.n1DBtJJm087917>