2007-03-20 07:23:10 -04:00
|
|
|
$OpenBSD: patch-Source_kwsys_Registry_cxx,v 1.3 2007/03/20 11:23:10 espie Exp $
|
|
|
|
--- Source/kwsys/Registry.cxx.orig Wed Jan 10 18:59:15 2007
|
|
|
|
+++ Source/kwsys/Registry.cxx Sun Mar 18 13:52:03 2007
|
|
|
|
@@ -756,7 +756,7 @@ kwsys_stl::string RegistryHelper::EncodeKey(const char
|
2006-07-20 05:23:13 -04:00
|
|
|
{
|
|
|
|
case '%': case '=': case '\n': case '\r': case '\t':
|
|
|
|
char buffer[4];
|
|
|
|
- sprintf(buffer, "%%%02X", *str);
|
|
|
|
+ snprintf(buffer, sizeof buffer, "%%%02X", *str);
|
|
|
|
ostr << buffer;
|
|
|
|
break;
|
|
|
|
default:
|
2007-03-20 07:23:10 -04:00
|
|
|
@@ -777,7 +777,7 @@ kwsys_stl::string RegistryHelper::EncodeValue(const ch
|
2006-07-20 05:23:13 -04:00
|
|
|
{
|
|
|
|
case '%': case '=': case '\n': case '\r': case '\t':
|
|
|
|
char buffer[4];
|
|
|
|
- sprintf(buffer, "%%%02X", *str);
|
|
|
|
+ snprintf(buffer, sizeof buffer, "%%%02X", *str);
|
|
|
|
ostr << buffer;
|
|
|
|
break;
|
|
|
|
default:
|