Commit fe63eca8 authored by Ian Craggs's avatar Ian Craggs

Fix potential buffer overflow

Bug: 427028
parent 1104e0e5
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
* Contributors: * Contributors:
* Ian Craggs - initial API and implementation and/or initial documentation * Ian Craggs - initial API and implementation and/or initial documentation
* Ian Craggs - updates for the async client * Ian Craggs - updates for the async client
* Ian Craggs - fix for bug #427028
*******************************************************************************/ *******************************************************************************/
/** /**
...@@ -166,7 +167,7 @@ int Log_initialize(Log_nameValue* info) ...@@ -166,7 +167,7 @@ int Log_initialize(Log_nameValue* info)
{ {
while (info->name) while (info->name)
{ {
sprintf(msg_buf, "%s: %s", info->name, info->value); snprintf(msg_buf, sizeof(msg_buf), "%s: %s", info->name, info->value);
Log_output(TRACE_MINIMUM, msg_buf); Log_output(TRACE_MINIMUM, msg_buf);
info++; info++;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment