Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37858785
en ru br
ALT Linux repos
S:6.20.00-alt4
5.0: 6.16.00-alt1
4.1: 6.16.00-alt0.M41.1
4.0: 6.14.00-alt2
3.0: 6.14.00-alt1

Group :: Shells
RPM: tcsh

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: tcsh-6.10.01-alt-cleanups.patch
Download


diff -Naur tcsh-6.10.01.orig/ed.term.c tcsh-6.10.01/ed.term.c
--- tcsh-6.10.01.orig/ed.term.c	Sun Nov 12 02:03:34 2000
+++ tcsh-6.10.01/ed.term.c	Wed Feb 20 13:26:32 2002
@@ -592,7 +592,7 @@
     char cmdname[BUFSIZE];
 
     USE(t);
-    setname(strcpy(cmdname, short2str(*v++)));
+    setname(strncpy(cmdname, short2str(*v++),sizeof(cmdname)));
 
     while (v && *v && v[0][0] == '-' && v[0][2] == '\0') 
 	switch (v[0][1]) {
diff -Naur tcsh-6.10.01.orig/ma.setp.c tcsh-6.10.01/ma.setp.c
--- tcsh-6.10.01.orig/ma.setp.c	Fri Apr 26 23:18:36 1996
+++ tcsh-6.10.01/ma.setp.c	Wed Feb 20 13:22:13 2002
@@ -466,7 +466,7 @@
 {
     int i;
     char *new;
-    char newbuf[2000];
+    char newbuf[BUFSIZ];
     if (sflag) {       /* add suffix */
     new = newbuf;
diff -Naur tcsh-6.10.01.orig/sh.c tcsh-6.10.01/sh.c
--- tcsh-6.10.01.orig/sh.c	Wed Feb 20 13:11:25 2002
+++ tcsh-6.10.01/sh.c	Wed Feb 20 13:14:59 2002
@@ -2159,7 +2159,7 @@
     }
 
     f = globone(*t++, G_ERROR);
-    (void) strcpy(buf, short2str(f));
+    (void) strncpy(buf, short2str(f),sizeof(buf));
     xfree((ptr_t) f);
     if ((!srcfile(buf, 0, hflg, t)) && (!hflg) && (!bequiet))
 	stderror(ERR_SYSTEM, buf, strerror(errno));
diff -Naur tcsh-6.10.01.orig/sh.func.c tcsh-6.10.01/sh.func.c
--- tcsh-6.10.01.orig/sh.func.c	Tue Mar 13 15:53:50 2001
+++ tcsh-6.10.01/sh.func.c	Wed Feb 20 13:16:22 2002
@@ -1601,7 +1601,7 @@
 
     if (cname == NULL)
 	return;
-    (void) strcpy(nameBuf, cname);
+    (void) strncpy(nameBuf, cname,sizeof(nameBuf));
     setenv(nameBuf, short2str(val), 1);
 #else /* !SETENV_IN_LIB */
     register Char **ep = STR_environ;
diff -Naur tcsh-6.10.01.orig/tc.func.c tcsh-6.10.01/tc.func.c
--- tcsh-6.10.01.orig/tc.func.c	Sun Nov 12 05:18:06 2000
+++ tcsh-6.10.01/tc.func.c	Wed Feb 20 13:26:08 2002
@@ -470,8 +470,8 @@
     if (!GotTermCaps)
 	GetTermCaps();
 
-    (void) strcpy(tv[0], short2str(v[1]));
-    (void) strcpy(tv[1], short2str(v[2]));
+    (void) strncpy(tv[0], short2str(v[1]),sizeof(tv[0]));
+    (void) strncpy(tv[1], short2str(v[2]),sizeof(tv[1]));
     SetTC(tv[0], tv[1]);
 }
 
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin