Home | History | Annotate | Download | only in tr
History log of /src/usr.bin/tr/str.c
RevisionDateAuthorComments
 1.30  26-May-2018  leot Do not accept invalid octal character values (>= 0400).

This also avoid possible stack corruption (e.g. previously `tr -s '\400'' or
similars lead to them).

Reviewed and thanks to <pgoyette>!
 1.29  11-Aug-2013  dholland branches: 1.29.4; 1.29.18; 1.29.24;
Whitespace.
 1.28  11-Aug-2013  dholland Fix another bug, relating to parsing the [=x=] syntax.
 1.27  11-Aug-2013  dholland Tidy up more. This is pretty ratty code.
 1.26  11-Aug-2013  dholland Tidy up.
 1.25  11-Aug-2013  dholland Pass -Wpointer-sign.
 1.24  11-Aug-2013  dholland avoid undefined behavior.
 1.23  11-Aug-2013  dholland Simplify the parser handling.
 1.22  11-Aug-2013  dholland sprinkle const
 1.21  11-Aug-2013  dholland Make the parser state opaque. While here, fix a memory leak when using
the [:foo:] syntax.
 1.20  10-Aug-2013  dholland Expose less of the parser state outside str.c.
 1.19  08-Sep-2011  christos branches: 1.19.2; 1.19.8;
revert previous; don't change the logic.
 1.18  08-Sep-2011  christos don't forget to 0 init the rest of the array since now we removed the memset
 1.17  08-Sep-2011  christos a little more KNF, plus add \e (from the previous commit)
 1.16  08-Sep-2011  christos It is pointless to assign to the CLASS.set member and never use it again.
Perhaps the author meant to check if it is already set and not allocated it
again to avoid memory leaks? Anyway make everything const back and delete
the unused code. Yes, this leaks the same way as before but it is
insignificant. If we want to save memory we could use bytes or even bits
instead of ints, and not allocate/initialize the same thing multiple times.
 1.15  07-Sep-2011  joerg Add comment to explain the const issue to avoid future trouble.
 1.14  07-Sep-2011  riz Remove newly-introduced const qualifier from static CLASS classes[],
as CLASS->set gets changed in genclass(). Fixes a segfault doing:

tr '[:lower:]' '[:upper:]'

on (at least) amd64.
 1.13  06-Sep-2011  joerg ANSIfy. Sprinkle const and __dead.
 1.12  13-Apr-2009  lukem Fix WARNS=4 (-Wcast-qual -Wextra)
 1.11  17-Jan-2007  hubertf branches: 1.11.20;
Remove duplicate #includes
From Slava Semushin <slava.semushin@gmail.com>, via private mail
 1.10  07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22365, verified by myself.
 1.9  16-Mar-1999  kleink Correct the ctype function used for [:print:] character class; from Soren S.
Jorvang in PR bin/7167.
 1.8  20-Oct-1997  lukem WARNSify, fix .Nm usage, getopt returns -1 not EOF, use <err.h>
 1.7  31-Aug-1995  jtc Sync with 4.4lite2
 1.6  07-Dec-1994  jtc Merged with 4.4lite.
Changed to conform to NetBSD's new RCS Id convention.
 1.5  22-Oct-1993  jtc From Jeremy Scofield -- correctly terminate ranges with backquoted endpoint.
 1.4  14-Sep-1993  jtc Remove explicit declarations of isfoo() functions, because we fixed
ctype.h to declare the isfoo() functions.
Remove isblank, as our C library now provides it.
 1.3  01-Aug-1993  mycroft Add RCS identifiers.
 1.2  29-Jul-1993  mycroft Don't repeat the last character in a range.
 1.1  27-Apr-1993  glass branches: 1.1.1; 1.1.2;
integrated updated 'tr' from ftp.uu.net:bsd-sources
 1.1.2.1  29-Jul-1993  mycroft Don't repeat the last character in a range.
 1.1.1.2  31-Aug-1995  jtc imported from 44lite2
 1.1.1.1  07-Dec-1994  jtc imported from 4.4lite
 1.11.20.1  13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.19.8.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.19.2.1  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.29.24.1  25-Jun-2018  pgoyette Sync with HEAD
 1.29.18.1  08-Jun-2018  martin Pull up following revision(s) (requested by leot in ticket #850):

usr.bin/tr/str.c: revision 1.30

Do not accept invalid octal character values (>= 0400).

This also avoid possible stack corruption (e.g. previously `tr -s '\400'' or
similars lead to them).

Reviewed and thanks to <pgoyette>!
 1.29.4.1  06-Jun-2018  martin Pull up following revision(s) (requested by leot in ticket #1609):

usr.bin/tr/str.c: revision 1.30

Do not accept invalid octal character values (>= 0400).

This also avoid possible stack corruption (e.g. previously `tr -s '\400'' or
similars lead to them).

Reviewed and thanks to <pgoyette>!

RSS XML Feed