aboutsummaryrefslogtreecommitdiffstats
path: root/help.c
diff options
context:
space:
mode:
Diffstat (limited to 'help.c')
-rw-r--r--help.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/help.c b/help.c
index c43d0459..14156eaf 100644
--- a/help.c
+++ b/help.c
@@ -156,8 +156,9 @@ char *help_get( help_t **help, char *title )
return NULL;
}
- lseek( h->fd, h->offset.file_offset, SEEK_SET );
- read( h->fd, s, h->length );
+ if( lseek( h->fd, h->offset.file_offset, SEEK_SET ) == -1 ||
+ read( h->fd, s, h->length ) != h->length )
+ return NULL;
}
else
{