Author: tom
Date: 2008-01-08 13:54:43 +0000 (Tue, 08 Jan 2008)
New Revision: 7322

Log:
Valid file descriptor argument to llseek system call.

Modified:
   trunk/coregrind/m_syswrap/syswrap-linux.c


Modified: trunk/coregrind/m_syswrap/syswrap-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-linux.c   2008-01-08 00:36:15 UTC (rev 
7321)
+++ trunk/coregrind/m_syswrap/syswrap-linux.c   2008-01-08 13:54:43 UTC (rev 
7322)
@@ -582,7 +582,10 @@
                  unsigned int, fd, unsigned long, offset_high,
                  unsigned long, offset_low, vki_loff_t *, result,
                  unsigned int, whence);
-   PRE_MEM_WRITE( "llseek(result)", ARG4, sizeof(vki_loff_t));
+   if (!ML_(fd_allowed)(ARG1, "llseek", tid, False))
+      SET_STATUS_Failure( VKI_EBADF );
+   else
+      PRE_MEM_WRITE( "llseek(result)", ARG4, sizeof(vki_loff_t));
 }
 POST(sys_llseek)
 {


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Valgrind-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-developers

Reply via email to