Index: compiled/filter/ActiveFilter.cpp |
=================================================================== |
--- a/compiled/filter/ActiveFilter.cpp |
+++ b/compiled/filter/ActiveFilter.cpp |
@@ -21,18 +21,19 @@ |
#include "../StringScanner.h" |
namespace |
{ |
const DependentString DEFAULT_DOMAIN(u""_str); |
OwnedString to_string(unsigned int i) |
{ |
- char buffer[11]; |
- int len = sprintf(buffer, "%u", i); |
+ const std::size_t BUFFER_SIZE = 11; |
+ char buffer[BUFFER_SIZE]; |
+ int len = snprintf(buffer, BUFFER_SIZE, "%u", i); |
OwnedString result(len); |
hub
2017/04/06 10:31:23
From `man snprintf`
Wladimir Palant
2017/04/06 15:14:40
We have the same issue in the subscription classes
|
for (String::size_type i = 0; i < len; i++) |
result[i] = buffer[i]; |
return result; |
} |
} |