diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-02-12 19:54:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-02-12 19:54:24 +0300 |
commit | 55f68c36574779ae2fac3652466584628b22c633 (patch) | |
tree | e2f55301dda8897bf17f8b8459229d8fa5a67816 /source/blender/editors/interface | |
parent | 9eee1f962d49f14d92c8da4e677e4ee140f4f440 (diff) |
fix for more warnings.
- modifier code was using sizeof() without knowing the sizeof the array when clearing the modifier type array.
- use BLI_snprintf rather then sprintf where the size of the string is known.
- particle drawing code kept a reference to stack float values (not a problem at the moment but would crash if accessed later).
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/interface_regions.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c index e8a383dbe15..4574c1fd4ad 100644 --- a/source/blender/editors/interface/interface_regions.c +++ b/source/blender/editors/interface/interface_regions.c @@ -2295,7 +2295,8 @@ static void vconfirm_opname(bContext *C, const char *opname, const char *title, s= buf; if (title) s+= sprintf(s, "%s%%t|", title); - vsprintf(s, itemfmt, ap); + vsnprintf(s, sizeof(buf) - (s - buf), itemfmt, ap); + buf[sizeof(buf) - 1]= '\0'; handle= ui_popup_menu_create(C, NULL, NULL, NULL, NULL, buf); |