X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fsflow_agent.c;h=f55e6d4496f9918122e19c9d94b079ee7a18d6ee;hb=620606f63cc56c7541005dc6787106789e2c364e;hp=ba8d2bf9964b2f2302a6c3439c5939ab1f876434;hpb=d295e8e97acae13552a5b220d3fbcff8201064a2;p=sliver-openvswitch.git diff --git a/lib/sflow_agent.c b/lib/sflow_agent.c index ba8d2bf99..f55e6d449 100644 --- a/lib/sflow_agent.c +++ b/lib/sflow_agent.c @@ -1,5 +1,9 @@ -/* Copyright (c) 2002-2009 InMon Corp. Licensed under the terms of the InMon sFlow licence: */ -/* http://www.inmon.com/technology/sflowlicense.txt */ +/* Copyright (c) 2002-2009 InMon Corp. Licensed under the terms of either the + * Sun Industry Standards Source License 1.1, that is available at: + * http://host-sflow.sourceforge.net/sissl.html + * or the InMon sFlow License, that is available at: + * http://www.inmon.com/technology/sflowlicense.txt + */ #include "sflow_api.h" @@ -449,7 +453,7 @@ void sfl_agent_resetReceiver(SFLAgent *agent, SFLReceiver *receiver) void sfl_agent_error(SFLAgent *agent, char *modName, char *msg) { char errm[MAX_ERRMSG_LEN]; - sprintf(errm, "sfl_agent_error: %s: %s\n", modName, msg); + snprintf(errm, sizeof errm, "sfl_agent_error: %s: %s\n", modName, msg); if(agent->errorFn) (*agent->errorFn)(agent->magic, agent, errm); else { fprintf(stderr, "%s\n", errm); @@ -465,7 +469,7 @@ void sfl_agent_error(SFLAgent *agent, char *modName, char *msg) void sfl_agent_sysError(SFLAgent *agent, char *modName, char *msg) { char errm[MAX_ERRMSG_LEN]; - sprintf(errm, "sfl_agent_sysError: %s: %s (errno = %d - %s)\n", modName, msg, errno, strerror(errno)); + snprintf(errm, sizeof errm, "sfl_agent_sysError: %s: %s (errno = %d - %s)\n", modName, msg, errno, strerror(errno)); if(agent->errorFn) (*agent->errorFn)(agent->magic, agent, errm); else { fprintf(stderr, "%s\n", errm);