Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-07-28 02:41:35 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-07-28 02:41:35 +0400
commit396ebf0c91b1527e6ea1ab923a314a164007b8e9 (patch)
tree87e19f104ec4def173e7eccad0690ab65984341d /source/blender/imbuf/intern/readimage.c
parentcc3c21f27cd0cf80d00d35f77a0ede8d942a5cce (diff)
better loading partially written TARGA's, dont read over the end of the buffer and set the remaining pixels 0.
Diffstat (limited to 'source/blender/imbuf/intern/readimage.c')
-rw-r--r--source/blender/imbuf/intern/readimage.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/imbuf/intern/readimage.c b/source/blender/imbuf/intern/readimage.c
index 1a6ab104bcf..4104a8db65c 100644
--- a/source/blender/imbuf/intern/readimage.c
+++ b/source/blender/imbuf/intern/readimage.c
@@ -143,7 +143,7 @@ ImBuf *IMB_ibImageFromMemory(int *mem, int size, int flags) {
ibuf = imb_bmp_decode((uchar *)mem, size, flags);
if (ibuf) return(ibuf);
- ibuf = imb_loadtarga((uchar *)mem, flags);
+ ibuf = imb_loadtarga((uchar *)mem, size, flags);
if (ibuf) return(ibuf);
ibuf = imb_loaddpx((uchar *)mem, size, flags);
@@ -229,7 +229,7 @@ struct ImBuf *IMB_loadiffmem(int *mem, int flags) {
}
}
- ibuf = imb_loadtarga((uchar *) mem,flags);
+ ibuf = imb_loadtarga((uchar *) mem,maxlen,flags);
if (ibuf) return(ibuf);
if (IB_verbose) fprintf(stderr,"Unknown fileformat\n");