summaryrefslogtreecommitdiff
path: root/usr.bin/awk
AgeCommit message (Collapse)Author
2016-04-12Fix awk crash with empty assignment, e.g. 'BEGIN {i=$1}', whenTodd C. Miller
malloc does not return zero-filled data. OK tb@
2015-12-16Remove modulo bias in random number generator.tb
Diff from Matthew Martin, rewieved by deraadt@ and me. ok deraadt@, millert@
2015-10-22Until we understand the sitaution better, we should pledge() afterTheo de Raadt
setlocale(), not before. Not just here, but probably everywhere?
2015-10-10Add pledge support in awk and make awk -safe actually safe.Doug Hogan
awk -safe was introduced back in 1997 to stop awk from doing file output, execute commands or access the environment. The lexer rejected programs when it saw awk commands that would write, exec or env. Beyond that, it wasn't safe from write/exec/env during program execution. With pledge "stdio rpath", the kernel is now enforcing the awk -safe mode restrictions at runtime (other than env). Based on a diff by deraadt@ ok deraadt@ beck@
2015-09-14Avoid .Ns right after .Pf, it's pointless.Ingo Schwarze
In some cases, do additional cleanup in the immediate vicinity.
2015-09-05When rand() was made fully random, the return value of srand() wasTheo de Raadt
also affected incorrectly. Noticed by Stephane Chazelas. This reverts the return value of srand() to the old (not very useful) behaviour. This also allows toggling rand() to strong/weak based upon whether srand() is called without/with an argument. Long discussion and work with millert ok beck
2015-03-27Don't display empty error context.Tobias Ulmer
Context extraction didn't handle this case and showed uninitialized memory. ok tobias, miod
2015-01-16fix placement of opening parentheses, and drop some .Xo while hereIngo Schwarze
2014-12-19Use reallocarray() where suitableTheo de Raadt
ok millert doug
2014-12-15.Xr cut which may be what you're really looking for.Ted Unangst
2014-12-08Use srandom_deterministic() if a seed is supplied, thereby switching theTheo de Raadt
subsystem out of strong random mode. No effective change from what we've been doing for a while. Result is it becomes 1 line of code. ok millert
2014-12-01Fix %c for floating values that become 0 when coerced to int.Todd C. Miller
From Jeremy Devenport
2014-10-11Userland reallocarray() audit.Doug Hogan
Avoid potential integer overflow in the size argument of malloc() and realloc() by using reallocarray() to avoid unchecked multiplication. ok deraadt@
2014-03-17as suggested by schwarze, reshuffle STANDARDS text detailing posix featuresJason McIntyre
we don;t support next to the posix compat blurb, in order to make things a bit clearer; this also makes the text more concise; ok millert schwarze sobrado
2013-09-29use a more clearly named variable for the srandom case in the codeTheo de Raadt
ok millert
2013-08-18Remove wrong workaround for the 88100 `awk bug' - it turns out compilingMiod Vallat
with -O2 changes the alignment of code and data, which caused the awk binary to be more prone to trigger the DAE bug which just got fixed.
2013-07-28Build awk with -O1 on m88k for now; when built -O2, it would sporadicallyMiod Vallat
exit early blaming a spurious '}' in the first few lines of input, but only on 88100-based systems.
2012-12-21remove makefile hacks that are no longer needed with t1 t2: working properlyMarc Espie
okay krw@
2011-09-28Update awk to Aug 10, 2011 version; naddy@ reports no ports problemsTodd C. Miller
from the update.
2011-05-02no need to escape `|'; as discussed with schwartzeJason McIntyre
2011-04-20Stash the old seed when srand() is called and use it as the returnTodd C. Miller
value as per POSIX and the fine manual. Fix sent upstream to bwk. OK deraadt@
2011-03-22some small tweaks from Michael W. Bombardieri;Jason McIntyre
ok sobrado
2011-02-07Between groff-1.15 and groff-1.20.1, the .Ns macro was changed to noIngo Schwarze
longer suppress spacing when used at the beginning of an input line, and mandoc now follows the same behaviour as new groff. Thus, sweep the tree and remove useless .Ns. Most places found by jmc@; ok jmc@ kristaps@.
2010-10-01more EXIT STATUS tweaks; from Daniel DickmanJason McIntyre
2010-08-25get rid of the nawk hard linkTheo de Raadt
ok millert guenther
2010-08-08convert some of the weirder displays into lists, to avoid mangling;Jason McIntyre
2010-06-13Update awk to May 23, 2010 version. OK miod@Todd C. Miller
2010-01-10remove references to docs we no longer install;Jason McIntyre
2010-01-04Stop installing many of the incredibly dated and un-authoritative share/docTheo de Raadt
files. If any information found in these documents is worthwhile and you miss it, please make the time to work it into the manual pages (which people actually do read). ok guenther
2009-02-08bump the posix reference in STANDARDS to IEEE Std 1003.1-2008, with a fewJason McIntyre
updates to follow;
2008-10-06Update awk to version 20071023; OK deraadt@Todd C. Miller
2008-09-04+awk does not support {n,m} pattern matchingJason McIntyre
noted by Vadim Zhukov, though slightly different (doc) fix committed; ok millert
2008-07-25repair .Pq use; Alan R. S. BuenoTheo de Raadt
2008-06-04tweak previous, and arrange the text to read a little better;Jason McIntyre
2008-06-04Extend awk with bitwise operations. This is an extension to the awkPierre-Yves Ritschard
spec and documented as such, but comes in handy from time to time. The prototypes make it compatible with a similar GNU awk extension. ok millert@, enthusiasm from deraadt@
2008-04-13Use arc4random_buf() when requesting more than a single word of outputDamien Miller
Use arc4random_uniform() when the desired random number upper bound is not a power of two ok deraadt@ millert@
2008-02-27fail nicely instead of crashing for format strings containing '*',Theo de Raadt
without a matching argument following from Jukka Salmi
2007-11-24fix yacc/lex parallel file generationMarc Espie
2007-09-02use calloc() to avoid malloc(n * m) overflows; checked by djm canacar jsgTheo de Raadt
2007-06-27printf(1) is the correct reference here, not printf(3);Jason McIntyre
from otto; ok millert
2007-05-31convert to new .Dd format;Jason McIntyre
2007-05-30- use a consistent text for STANDARDSJason McIntyre
- note which options are extensions to POSIX
2007-04-02Do not touch uninitialized variable, if sscanf(3) fails.Moritz Jodeit
ok millert@
2007-03-18allow this to build w/ cross-tools thru providing proper hostcflags; found ↵Michael Shalayeff
by rainor's work
2007-01-29sync the -f description w/ its synopsis;Jason McIntyre
2007-01-29sync usage(); spotted by Igor SobradoJason McIntyre
2006-11-04from ru@freebsd:Jason McIntyre
Fix a bug converting a variable from the numeric type to a string. ok otto deraadt
2006-04-16Handle / inside []s properly.Hugh Graham
OK by otto and millert. Offered back to bell-labs.
2006-03-29- document return value of cmd | getline [var]Jason McIntyre
- document fflush w/o arg from matthias kilian; ok otto
2006-03-19more sane calloc(3) usage; from adobriyan@gmail.com, ok millertPeter Valchev