Ecere Software
/
sdk
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
025dace
)
extras/DynamicString: Missed proper null character safety in earlier commit
author
Jerome St-Louis
<jerome@ecere.com>
Sat, 2 Feb 2013 02:23:44 +0000
(21:23 -0500)
committer
Jerome St-Louis
<jerome@ecere.com>
Sat, 2 Feb 2013 02:23:44 +0000
(21:23 -0500)
extras/types/DynamicString.ec
patch
|
blob
|
history
diff --git
a/extras/types/DynamicString.ec
b/extras/types/DynamicString.ec
index
8ff0ca4
..
6f14d49
100644
(file)
--- a/
extras/types/DynamicString.ec
+++ b/
extras/types/DynamicString.ec
@@
-44,9
+44,9
@@
class DynamicString : Array<char>
// TODO: improve this to vsprinf directly in the Array<char> instead of calling concat
char string[MAX_F_STRING];
va_list args;
- string[sizeof(string)-1] = 0;
va_start(args, format);
vsnprintf(string, sizeof(string), format, args);
+ string[sizeof(string)-1] = 0;
va_end(args);
concat(string);
}