diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-02-08 16:55:31 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-02-08 16:55:31 +0300 |
commit | ec7df03c867d28316708e9b91bec5cef0aee832e (patch) | |
tree | 3f560939b745032e235d9ac789c4117d669d6462 /source/blender/imbuf/intern/iff.c | |
parent | 4c318539b2f6abdf8f2a02376b6fcb8d30a4b12e (diff) |
Warning fixes, one actual bug found in sequencer sound wave drawing. Also
changed some malloc to MEM_mallocN while trying to track down a memory leak.
Diffstat (limited to 'source/blender/imbuf/intern/iff.c')
-rw-r--r-- | source/blender/imbuf/intern/iff.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/imbuf/intern/iff.c b/source/blender/imbuf/intern/iff.c index 5fd823e78c1..db2e54a31b6 100644 --- a/source/blender/imbuf/intern/iff.c +++ b/source/blender/imbuf/intern/iff.c @@ -198,16 +198,16 @@ unsigned short imb_update_iff(int file, int code) if (code == 0) return (TRUE); filelen-=4; - lseek(file,4L,1); + if(lseek(file,4L,1) == -1) return (FALSE); while (filelen>0){ /* seek BODY */ - read(file, buf, 8); + if(read(file, buf, 8) != 8) return (FALSE); filelen -= 8; if (buf[0] == code) break; skip = (BIG_LONG(buf[1]) + 1) & ~1; filelen -= skip; - lseek(file, skip, 1); + if(lseek(file, skip, 1) == -1) return (FALSE); } if (filelen <= 0) { printf("update_iff: couldn't find chunk\n"); |