diff --git a/slang/ChangeLog b/slang/ChangeLog new file mode 100644 index 000000000..7b9841eae --- /dev/null +++ b/slang/ChangeLog @@ -0,0 +1,10 @@ +Sun Feb 14 01:05:42 1999 Norbert Warmuth + + * sldisply.c (SLtt_get_terminfo): use g_snprintf instead of + sprintf + + * slsmg.c (SLsmg_printf): ditto + + * sltermin.c (SLtt_tigetent): ditto + + diff --git a/slang/Makefile.in b/slang/Makefile.in index 901477482..fda8cf63b 100644 --- a/slang/Makefile.in +++ b/slang/Makefile.in @@ -25,7 +25,7 @@ SLANGOBJS = sldisply.o slerr.o slsmg.o slutty.o \ # Distribution variables # -DISTSLANG = Makefile.in README $(SLANGSRCS) $(SLANGHDRS) +DISTSLANG = Makefile.in ChangeLog README $(SLANGSRCS) $(SLANGHDRS) all: @LIBSLANG@ diff --git a/slang/sldisply.c b/slang/sldisply.c index 711af7186..20eedf3cc 100644 --- a/slang/sldisply.c +++ b/slang/sldisply.c @@ -1781,7 +1781,7 @@ void SLtt_get_terminfo (void) SLtt_set_term_vtxxx (&vt102); return; } - sprintf (err_buf, "Unknown terminal: %s\n\ + g_snprintf (err_buf, sizeof (err_buf), "Unknown terminal: %s\n\ Check the TERM environment variable.\n\ Also make sure that the terminal is defined in the terminfo database.\n\ Alternatively, set the TERMCAP environment variable to the desired\n\ diff --git a/slang/slerr.c b/slang/slerr.c index 3a598296f..14eaf3187 100644 --- a/slang/slerr.c +++ b/slang/slerr.c @@ -35,7 +35,7 @@ void SLang_doerror (char *error) str = "Slang/Midnight Commander unknown error"; - sprintf(err, "S-Lang Error: %s", str); + g_snprintf(err, sizeof (err), "S-Lang Error: %s", str); if (SLang_Error_Routine == NULL) { diff --git a/slang/slsmg.c b/slang/slsmg.c index ababdf30d..2c87ce8ac 100644 --- a/slang/slsmg.c +++ b/slang/slsmg.c @@ -189,7 +189,7 @@ void SLsmg_printf (char *fmt, ...) va_list ap; va_start(ap, fmt); - (void) vsprintf(p, fmt, ap); + (void) g_vsnprintf(p, sizeof (p), fmt, ap); va_end(ap); SLsmg_write_string (p); @@ -947,7 +947,7 @@ void SLsmg_vprintf (char *fmt, va_list ap) { char p[1000]; - (void) vsprintf(p, fmt, ap); + (void) g_vsnprintf(p, sizeof (p), fmt, ap); SLsmg_write_string (p); } diff --git a/slang/sltermin.c b/slang/sltermin.c index 4f3d71712..d8144e90f 100644 --- a/slang/sltermin.c +++ b/slang/sltermin.c @@ -269,7 +269,7 @@ char *SLtt_tigetent (char *term) tidir = Terminfo_Dirs[i]; if (tidir != NULL) { - sprintf (file, "%s/%c/%s", tidir, *term, term); + g_snprintf (file, sizeof (file), "%s/%c/%s", tidir, *term, term); if (NULL != (fp = open_terminfo (file, ti))) break; } i++;