1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-14 20:22:21 +00:00

dthelp: Resolve format-overflow issues

This commit is contained in:
Peter Howkins 2021-12-23 19:54:18 +00:00 committed by Jon Trulson
parent 793d8b9262
commit bd49a5c948
2 changed files with 4 additions and 4 deletions

View file

@ -88,7 +88,7 @@ if ((m_argc > 2) && (strchr(m_argv[2], 'f') || strchr(m_argv[2], 'F')))
/* fills ``install'' with path to ourself */
{
char *path, *cp;
char buf[200];
char buf[BUFSIZ];
char patbuf[BUFSIZ];
int quit, none;
@ -138,7 +138,7 @@ else
quit++;
else
*cp = '\0';
sprintf(buf, "%s/%s", path, m_argv[0]);
snprintf(buf, sizeof(buf), "%s/%s", path, m_argv[0]);
if (access(buf, 1) == 0)
{

View file

@ -89,7 +89,7 @@ if ((m_argc > 2) && (strchr(m_argv[2], 'f') || strchr(m_argv[2], 'F')))
/* fills ``install'' with path to ourself */
{
char *path, *cp;
char buf[200];
char buf[BUFSIZ];
char patbuf[BUFSIZ];
int quit, none;
@ -139,7 +139,7 @@ else
quit++;
else
*cp = '\0';
sprintf(buf, "%s/%s", path, m_argv[0]);
snprintf(buf, sizeof(buf), "%s/%s", path, m_argv[0]);
if (access(buf, 1) == 0)
{