X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=progs%2Fdump_entry.c;h=392a11923379254e967d584516c5cb9df65f2eb0;hp=7be9b9127b82535c8e25f8c87315bed3672ab730;hb=e2e9c09c48b19b24979cafb2d4864f538b5ddd1c;hpb=cfd9c6f8e5af24820fefbb789b7345d93b8ed837 diff --git a/progs/dump_entry.c b/progs/dump_entry.c index 7be9b912..392a1192 100644 --- a/progs/dump_entry.c +++ b/progs/dump_entry.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2014,2015 Free Software Foundation, Inc. * + * Copyright (c) 1998-2015,2016 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -39,7 +39,7 @@ #include "termsort.c" /* this C file is generated */ #include /* so is this */ -MODULE_ID("$Id: dump_entry.c,v 1.124 2015/11/28 22:54:33 tom Exp $") +MODULE_ID("$Id: dump_entry.c,v 1.126 2016/09/10 20:41:23 tom Exp $") #define DISCARD(string) string = ABSENT_STRING #define PRINTF (void) printf @@ -121,7 +121,7 @@ strncpy_DYN(DYNBUF * dst, const char *src, size_t need) if (dst->text == 0) failed("strncpy_DYN"); } - (void) strncpy(dst->text + dst->used, src, need); + _nc_STRNCPY(dst->text + dst->used, src, need); dst->used += need; dst->text[dst->used] = 0; } @@ -1177,7 +1177,8 @@ dump_entry(TERMTYPE *tterm, wrap_concat("\n"); wrap_concat("hex:"); for (n = 0; n < offset; ++n) { - sprintf(numbuf, "%02X", UChar(bigbuf[n])); + _nc_SPRINTF(numbuf, _nc_SLIMIT(sizeof(numbuf)) + "%02X", UChar(bigbuf[n])); wrap_concat(numbuf); } }