]> git.imager.perl.org - imager.git/blobdiff - iolayer.c
prevent an unsigned overflow in FT1 has_chars() implementation
[imager.git] / iolayer.c
index 39c8c298a583ceee516ddeb78f85ae7c54e733c8..3bc9979acebc59034df880f83e83a651179531a4 100644 (file)
--- a/iolayer.c
+++ b/iolayer.c
@@ -247,7 +247,7 @@ X<io_new_fd API>X<im_io_new_fd API>
 =category I/O Layers
 
 Returns a new io_glue object that has the source defined as reading
-from specified file descriptor.  Note that the the interface to receiving
+from specified file descriptor.  Note that the interface to receiving
 data from the io_glue callbacks hasn't been done yet.
 
   ctx - and Imager context object
@@ -379,7 +379,6 @@ from io_new_bufchain().
 size_t
 io_slurp(io_glue *ig, unsigned char **c) {
   ssize_t rc;
-  off_t orgoff;
   io_ex_bchain *ieb;
   unsigned char *cc;
   io_type inn = ig->type;
@@ -392,8 +391,6 @@ io_slurp(io_glue *ig, unsigned char **c) {
   ieb = ig->exdata;
   cc = *c = mymalloc( ieb->length );
   
-  orgoff = ieb->gpos;
-  
   bufchain_seek(ig, 0, SEEK_SET);
   
   rc = bufchain_read(ig, cc, ieb->length);
@@ -1375,7 +1372,8 @@ realseek_close(io_glue *igo) {
 }
 
 
-/* realseek_seek(ig, offset, whence)
+/*
+=item realseek_seek(ig, offset, whence)
 
 Implements seeking for a source that is seekable, the purpose of having this is to be able to
 have an offset into a file that is different from what the underlying library thinks.
@@ -1488,7 +1486,8 @@ buffer_close(io_glue *ig) {
 }
 
 
-/* buffer_seek(ig, offset, whence)
+/*
+=item buffer_seek(ig, offset, whence)
 
 Implements seeking for a buffer source.
 
@@ -1843,7 +1842,8 @@ bufchain_close(io_glue *ig) {
 }
 
 
-/* bufchain_seek(ig, offset, whence)
+/*
+=item bufchain_seek(ig, offset, whence)
 
 Implements seeking for a source that is seekable, the purpose of having this is to be able to
 have an offset into a file that is different from what the underlying library thinks.