mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-09 13:30:26 +02:00
sendfile: Check return value of `lseek'.
* libguile/filesys.c (scm_sendfile): Check return value of `lseek_or_lseek64', and use `SCM_SYSERROR' upon error.
This commit is contained in:
parent
45417ab106
commit
f28885f495
1 changed files with 4 additions and 1 deletions
|
@ -1157,7 +1157,10 @@ SCM_DEFINE (scm_sendfile, "sendfile", 3, 1, 0,
|
|||
if (SCM_PORTP (in))
|
||||
scm_seek (in, offset, scm_from_int (SEEK_SET));
|
||||
else
|
||||
lseek_or_lseek64 (in_fd, c_offset, SEEK_SET);
|
||||
{
|
||||
if (lseek_or_lseek64 (in_fd, c_offset, SEEK_SET) < 0)
|
||||
SCM_SYSERROR;
|
||||
}
|
||||
}
|
||||
|
||||
for (result = 0, left = c_count; result < c_count; )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue