mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-03 08:11:08 +00:00
* hurd/fd-read.c (_hurd_fd_read): Fix last change.
This commit is contained in:
parent
8a26088de1
commit
7385c04c8c
@ -1,3 +1,7 @@
|
||||
2008-07-22 Roland McGrath <roland@frob.com>
|
||||
|
||||
* hurd/fd-read.c (_hurd_fd_read): Fix last change.
|
||||
|
||||
2008-07-21 Roland McGrath <roland@frob.com>
|
||||
|
||||
* hurd/fd-read.c (_hurd_fd_read): Return EGRATUITOUS if the server
|
||||
|
@ -42,7 +42,10 @@ _hurd_fd_read (struct hurd_fd *fd, void *buf, size_t *nbytes, loff_t offset)
|
||||
if (data != buf)
|
||||
{
|
||||
if (nread > *nbytes) /* Sanity check for bogus server. */
|
||||
return EGRATUITOUS;
|
||||
{
|
||||
__vm_deallocate (__mach_task_self (), (vm_address_t) data, nread);
|
||||
return EGRATUITOUS;
|
||||
}
|
||||
memcpy (buf, data, nread);
|
||||
__vm_deallocate (__mach_task_self (), (vm_address_t) data, nread);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user