openbsd-ports/devel/cmake/patches/patch-Source_kwsys_Registry_cxx

22 lines
791 B
Plaintext
Raw Normal View History

$OpenBSD: patch-Source_kwsys_Registry_cxx,v 1.2 2006/12/18 16:04:32 espie Exp $
--- Source/kwsys/Registry.cxx.orig Mon Dec 4 17:04:05 2006
+++ Source/kwsys/Registry.cxx Sun Dec 17 11:07:03 2006
@@ -756,7 +756,7 @@ kwsys_stl::string RegistryHelper::Encode
{
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:
@@ -777,7 +777,7 @@ kwsys_stl::string RegistryHelper::Encode
{
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: