Skip to content

Commit

Permalink
Do not use strlcpy(3)
Browse files Browse the repository at this point in the history
Remove the dependency.


git-svn-id: svn:https://anonscm.debian.org/svn/pcsclite/trunk/PCSC@7064 0ce88b0d-b2fd-0310-8134-9614164e65ea
  • Loading branch information
LudovicRousseau committed Dec 31, 2014
1 parent 7a50286 commit dd75c7f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/debuglog.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "misc.h"
#include "debuglog.h"
#include "sys_generic.h"
#include "strlcpycat.h"

#ifdef NO_LOG

Expand Down Expand Up @@ -203,10 +202,10 @@ static void log_xxd_always(const int priority, const char *msg,
char DebugBuffer[len*3 + strlen(msg) +1];
int i;
char *c;
size_t l;

l = strlcpy(DebugBuffer, msg, sizeof(DebugBuffer));
c = DebugBuffer + l;
/* DebugBuffer is always big enough for msg */
strcpy(DebugBuffer, msg);
c = DebugBuffer + strlen(DebugBuffer);

for (i = 0; (i < len); ++i)
{
Expand Down

0 comments on commit dd75c7f

Please sign in to comment.