From df39054c869d26b1aeeaca958b54869521802712 Mon Sep 17 00:00:00 2001 From: Alexander Gottwald Date: Fri, 11 Feb 2005 10:53:05 +0000 Subject: Import changes from XORG-6.8.2 --- src/RdFToBuf.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/RdFToBuf.c') diff --git a/src/RdFToBuf.c b/src/RdFToBuf.c index 898a9fc..f6ad75d 100644 --- a/src/RdFToBuf.c +++ b/src/RdFToBuf.c @@ -37,6 +37,8 @@ * HeDu (hedu@cul-ipn.uni-kiel.de) 4/94 */ +/* October 2004, source code review by Thomas Biege */ + #include "XpmI.h" #include #if !defined(FOR_MSW) && !defined(WIN32) @@ -58,7 +60,8 @@ XpmReadFileToBuffer(filename, buffer_return) char *filename; char **buffer_return; { - int fd, fcheck, len; + int fd, fcheck; + off_t len; char *ptr; struct stat stats; FILE *fp; @@ -82,7 +85,7 @@ XpmReadFileToBuffer(filename, buffer_return) close(fd); return XpmOpenFailed; } - len = (int) stats.st_size; + len = stats.st_size; ptr = (char *) XpmMalloc(len + 1); if (!ptr) { fclose(fp); -- cgit v1.2.3