diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-01-28 16:57:56 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-01-28 16:57:56 +0400 |
commit | 2a144f03048efb0caaf29049f7a6e518148e3fb2 (patch) | |
tree | f3c0ab3863a2bc3494f6dd2b807dcc8d4177f444 /source/blender/editors | |
parent | 2bae448ed554a27377baa3c4e78c88623597c880 (diff) |
Fix for wrong icons buffer initialization happens for cards
without NPOT support. Was wrong stride used for memcpy leading
to wrong memory writes in def_internal_icon.
It's a regression since matcap commit.
Should fix the following reports:
- #33993: Crash on Blender startup (Vista x32)
- #33996: Latest build crashes on win xp
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/interface/interface_icons.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index 8b4b1752774..619fb18cd7a 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -169,7 +169,7 @@ static DrawInfo *def_internal_icon(ImBuf *bbuf, int icon_id, int xofs, int yofs, /* this code assumes square images */ imgsize = bbuf->x; for (y = 0; y < size; y++) { - memcpy(&iimg->rect[y * size], &bbuf->rect[(y + yofs) * imgsize + xofs], imgsize * sizeof(int)); + memcpy(&iimg->rect[y * size], &bbuf->rect[(y + yofs) * imgsize + xofs], size * sizeof(int)); } } } |