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>2011-02-12 19:54:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-02-12 19:54:24 +0300
commit55f68c36574779ae2fac3652466584628b22c633 (patch)
treee2f55301dda8897bf17f8b8459229d8fa5a67816 /intern/guardedalloc
parent9eee1f962d49f14d92c8da4e677e4ee140f4f440 (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 'intern/guardedalloc')
-rw-r--r--intern/guardedalloc/intern/mallocn.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/intern/guardedalloc/intern/mallocn.c b/intern/guardedalloc/intern/mallocn.c
index 83aceb12344..27170439a53 100644
--- a/intern/guardedalloc/intern/mallocn.c
+++ b/intern/guardedalloc/intern/mallocn.c
@@ -167,12 +167,13 @@ static int malloc_debug_memset= 0;
static void print_error(const char *str, ...)
{
- char buf[1024];
+ char buf[512];
va_list ap;
va_start(ap, str);
- vsprintf(buf, str, ap);
+ vsnprintf(buf, sizeof(buf), str, ap);
va_end(ap);
+ buf[sizeof(buf) - 1] = '\0';
if (error_callback) error_callback(buf);
}