1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-09-25 05:27:12 +02:00
Commit Graph

3985 Commits

Author SHA1 Message Date
romkatv
3eea35d085 fix cursor position with ZLE_RPROMPT_INDENT=0 2019-05-28 09:39:22 +01:00
Oliver Kiddle
a531a1ec2d 44345: fix wordcode traversal where ! without a following command could result in a crash 2019-05-23 01:05:01 +02:00
Oliver Kiddle
3de2333b08 44307: allow for atoi() returning a negative number 2019-05-20 00:14:01 +02:00
Oliver Kiddle
fae7c85331 44284: combination of -T and -p to typeset crashed the shell. 2019-05-14 23:36:59 +02:00
Oliver Kiddle
b5519b372b 44290: job number exceeding int range and wrapping to a negative number crashed the shell 2019-05-14 23:22:24 +02:00
Oliver Kiddle
d66fd7fcf5 44291: printf with argument specifier out of range for an int crashed the shell 2019-05-14 23:18:32 +02:00
Peter Stephenson
30e356eb1a 44296: "typeset Q= {X}" crashed the shell. 2019-05-14 12:10:10 +01:00
Peter Stephenson
95211f87ed 44259: Ensure we can set signals to default even if ignored.
Previously the shell didn't take account of signals marked as

ignored on entry, which was inconsistent with other behaviour.
2019-05-13 09:55:01 +01:00
dana
c1a33575b4 44275: Fix compset -p/-s multibyte inconsistency and documentation 2019-05-08 16:35:08 -05:00
Oliver Kiddle
cd6fd2b0a3 44274: allow finer control of completion match soring with compadd's -o option 2019-05-07 23:24:49 +02:00
dana
6f202377c7 44267: sort: Restore option to ignore backslashes
Fix regression introduced by workers/41242
2019-05-03 20:13:48 -05:00
Peter Stephenson
588bb77cb6 44271: Fix breaks propagated from until or return.
If the until or return test caused continuation but there was
a pending return, breaks didn't get cancelled causing enclosing
scope to skip commands.
2019-05-03 20:34:53 +01:00
Peter Stephenson
ca456fbba3 44284: Mark SIGQUIT as ignore if ignored on entry to shell.
This prevents us from re-enabling it after a fork if it is being
ignored.
2019-04-25 20:29:54 +01:00
Peter Stephenson
d4972af12c 44254: Handle error case in zgetdir().
When retrieving path to current directory by looking for /,
ensure we have actually reached / by comparing inode.
If the current directory became invalid on some OSes including
Linux the parent directory is valid but is the same as the
current one.
2019-04-25 17:09:26 +01:00
dana
64d1373835 43288: fix line-broken prompts
Without re-breaking the case where a newline character lands in column 0.
2019-04-18 20:54:19 +02:00
dana
78fb8aaccf 44198: Add cd_silent option to suppress all cd output 2019-04-12 14:00:19 -05:00
Peter Stephenson
5e11082349 44168 (tweaked to remove change to errflag): Fix interrupt handling of zle -F.
If interrupted by irrelevant interrupt (EINTR only is set), don't set
the local error flag, just retry.
2019-04-10 20:56:53 +01:00
Eric Freese
5c165453ab 44214: <(...) substitutions shouldn't grab the terminal 2019-04-10 09:44:58 +01:00
Roman Perepelitsa
c551937280 44215: Maintain LASTWIDGET across reset-prompt.
This avoids side effects of asynchronous notifications.
2019-04-10 09:41:04 +01:00
Peter Stephenson
fe228c5984 44202: Rewrite to use memmove() for possibly overlapping copy 2019-04-10 09:31:41 +01:00
Jun-ichi Takimoto
52f3266bd0 44176: warn only if off_t is longer than long 2019-03-25 23:51:57 +09:00
Wesley Schwengle
5ca680c93c 44162 (tweaked): Avoid format-overflow warning in zftp.c 2019-03-25 23:01:43 +09:00
Wesley Schwengle
51d2e91a7e 44164: Avoid stringop-truncation warning 2019-03-25 20:42:54 +09:00
Matthew Martin
5267bdc4ef 44153: rm: Accept -R as equivalent to -r 2019-03-21 22:04:55 -05:00
Charles Blake
084bf17c4b 44132: don't hash commands beginning with / 2019-03-19 14:09:50 +00:00
Peter Stephenson
73b29f079b 44142: Fix hist_reduce_spaces bug.
When there were as an unstripped comment on the line the
pointer for stripping spaces could be bogus.  Don't do
any editing in that case.
2019-03-19 13:44:47 +00:00
Matthew Martin
6331772c5b 44135: Add chmod builtin 2019-03-18 22:17:54 -05:00
Kamil Dudka
00e6ab70b8 44122: turn int into long to avoid overflow 2019-03-14 09:46:23 +00:00
dana
632023acc2 44100: zparseopts: Add -F option, completion, tests; improve documentation
* Enable zparseopts to perform basic usage validation (aborting on an
  unrecognised option-like parameter)

* Officially document the resolution of ambiguous option specs
2019-03-12 19:03:56 -05:00
Yutian Li
0afe9dc02a 44067: Make history read safer on interrupt.
Record if a read was interrupted and if so process it in full
next time a read is needed.
2019-02-18 10:10:00 +00:00
Peter Stephenson
e25de2de74 c.f. 44062: Back off clearflag change to ZLE line init.
This causes problems with failed ZLE reads that printed a message
in the display area, in particular ignoreEOF warnings.

It appears it's not needed for the overall effect of the fixes in
zsh-workers/40302, commit 34656ec2.
2019-02-14 11:41:19 +00:00
dana
ed4c8f3d5e 44030: prompt: Return error for unrecognised colour name 2019-02-03 11:55:40 -06:00
Mikael Magnusson
d683d278c7 44011: Only use fg_start_code for non-truecolor
The sequence for truecolor uses a different prefix from palette colors
2019-01-23 11:51:42 +01:00
Peter Stephenson
232b43571f 43969: untokenize Dash for compctl with GLOB_SUBST set 2019-01-03 13:51:19 +00:00
Peter Stephenson
de31fe1f93 users/23809: ZLE_HIGHLIGHT extensions.
Allow non-termcap use of colours > 7.
Add tests.
2018-12-30 18:18:34 +00:00
Martijn Dekker
2d056ebc31 43945 (tweaked to remove test failure, noted in test):
Fix exit statuses from wait for POSIX_BUILTINS mode.
Also add tests.
2018-12-30 18:11:43 +00:00
Martijn Dekker
4215fcb107 43944: apply NO_UNSET consistently to arithmeitc 2018-12-30 18:03:02 +00:00
dana
7951ede1db unposted (per 43938): Avoid segfault when unmetafying empty string 2018-12-30 03:42:07 -06:00
dana
162c198aab 43953: Fix rounding/truncation error in %. time-format specifier
Also fixes an issue where %. couldn't be used more than once in a format
string without strange results

Tweaked very slightly per workers/43954
2018-12-29 05:24:25 -06:00
dana
f64cd71d44 43935: Reject too-large nanosecond values given to strftime
... and, in so doing, fix an error in the tests on 32-bit machines.

The value for the new too-large test is changed slightly from the patch posted
to the ML to make it test for the right thing on 32-bit machines as well.
2018-12-24 02:42:18 -06:00
Bart Schaefer
c19a0927e1 43921: ${\var} should be an error 2018-12-21 11:41:07 -08:00
Peter Stephenson
ef20425381 43854: Set tok to LEXERR on generic parse error.
Needed by main loop which detects an error this way.
2018-11-29 17:54:02 +00:00
Peter Stephenson
50f8fa972c 43837 plus test from Daniel: Empty string in nested subst.
Skip Nularg or there is a bogus character at the start.
2018-11-21 10:10:03 +00:00
Jun-ichi Takimoto
8d0f7681a0 43829: nearcolor.c: use double instead of float 2018-11-19 14:57:30 +09:00
Ivan Tkachenko
e258e7d251 43823: remove unnecessary metafy() in stattimeprint() 2018-11-15 10:59:09 +09:00
dana
5ad76492af 43800: Add nanosecond support to strftime built-in 2018-11-13 13:01:01 -06:00
Kamil Dudka
d50e204b0c 43790: failed mailstat could leak memory 2018-11-09 11:06:08 +00:00
Kamil Dudka
e27175c7c8 43789: possible use after free clearing up math func from module 2018-11-09 11:04:06 +00:00
Kamil Dudka
d1095bdf74 43723: file descriptor could leak on fork error 2018-11-09 11:02:24 +00:00
Kamil Dudka
031afe4207 43793: computil could overrun buffer 2018-11-09 10:57:09 +00:00
Kamil Dudka
a8cc017c74 43791: File descriptor could be closed twice in clone 2018-11-09 10:54:47 +00:00
Oliver Kiddle
5a70701788 43805: make nearcolor module use the default colour rather than black as a fallback 2018-11-08 11:01:36 +01:00
Oliver Kiddle
9eba4d3a44 43804: also need to be able to turn colour attributes back into hex triples for region_highlight variable 2018-11-08 11:01:29 +01:00
Oliver Kiddle
71c9130ede unposted: add usual copyright header to nearcolor module sources 2018-11-08 11:01:27 +01:00
Oliver Kiddle
50597692e0 43759: add support for true colour terminals 2018-11-05 22:24:12 +01:00
Oliver Kiddle
37d0005a9e 43747: new module to map colours from hex triplets to the nearest matching colour 2018-11-05 22:24:05 +01:00
Sebastian Gniazdowski
5556e00c65 43695: minor but simple optmiisation to use existing string length 2018-10-23 09:33:55 +01:00
Daniel Shahaf
bf9da44931 unposted: internals: Document sepjoin(). 2018-10-14 14:02:34 +00:00
Peter Stephenson
fa5b9bf6ee 43674: Split more PM_ flags for variables and functions.
This avoids using sign bit.

Also bump dev version because of wordcode incompatibility.
2018-10-12 09:25:04 +01:00
Peter Stephenson
0d3a786b7c 43669: ensure explicit exit status is used over implicit 2018-10-10 11:17:58 +01:00
Peter Stephenson
bbccbe0c85 43660: extend 43653 when final exit is implicit.
Combine logic for case after committed to exit (shell_exiting) with
case where exit occurred in a function we nee to unwind (exit_pending).

Add sarky note for future generations to be confused at.
2018-10-09 14:38:26 +01:00
Peter Stephenson
9ede8c657f 43656: special tied arrays don't have tieddata 2018-10-09 11:21:47 +01:00
Peter Stephenson
d768a7492a 43653: explicit exit from EXIT trap overrides exit status 2018-10-09 10:05:05 +01:00
Peter Stephenson
f99f7dca75 43616: Various parameter setting and display fixes.
Mostly to do with typeset -p and tied variables and their interaction.

Some general tied variable fixes.
2018-10-08 10:10:42 +01:00
Peter Stephenson
623294a3ed 43589: Further improved subjob reporting.
Show subjob status instead of user-visible superjob any time
the subjob still has associated processes.
2018-10-03 11:32:39 +01:00
Daniel Shahaf
d756c4d5cb 43531: Completion: Fix some false positives in the logic for "are these two candidates completions equivalent". 2018-09-30 22:18:46 +00:00
Daniel Shahaf
80ff65dc42 43570: Start documenting jobs.c, in particular superjobs. 2018-09-28 16:21:47 +00:00
Peter Stephenson
c2d65a3a6e 43564: improve job control report about stopped subjob 2018-09-26 16:23:00 +01:00
Daniel Shahaf
db67cc2f4b 43489: Add error checking on a new write() call.
Silences a compiler warning (write(2) is declared with warn_unused_result
in current Debian Unstable).
2018-09-25 19:35:15 +00:00
Peter Stephenson
464065f429 43543: Further improvements to fg/bg of superjob/subjob.
Attempt to keep STAT_STOPPED correct for superjob, rendering additional
"stopped = 1" unnecessary.

Wait for subjob before superjob.
2018-09-25 19:25:10 +01:00
Stephane Chazelas
a75b47973d 43546: "typeset -p" should show -U flag 2018-09-25 10:06:18 +01:00
Peter Stephenson
0a20f4e5a6 43535: Fixes for bg / fg handling of superjobs.
Be more consistent about marking both superjob and subjob as
running when sending SIGCONT.

Send SIGCONT to superjob / subjob combination any time it is put
in foreground, even if thought running, since subjob may invisibly
have suspended.

When waiting for superjob, wait for subjob, too.
2018-09-24 21:32:40 +01:00
Peter Stephenson
e76ea18477 43511: Initialiase alias entry on input stack.
This didn't happen if neither history nor alias expansion was in use.
2018-09-21 16:29:07 +01:00
Peter Stephenson
551ff84272 43464: Another attachtty() fix.
If list_pipe_job triggered more than once we need to know
the most recent process group leader, so record that
both if the attach happened in the main shell on in
entersubsh().

Also don't pass back proocess group for ESUB_ASYNC subshells.
2018-09-16 19:13:38 +01:00
Peter Stephenson
07ad7fd970 Fix windowsize when reattaching to terminal on process exit 2018-09-12 09:49:14 +01:00
Peter Stephenson
7c5241edf3 43446: More entersubsh() / addproc() wiring.
Fix additional races by passing back use of list_pipe_job
from subshell.
2018-09-12 09:22:10 +01:00
Jörg Thalheim
03a51a6f09 GitHub #28: Add missing math.h include for builtins
math.h is required for isnan/isinf
2018-09-10 13:05:46 +00:00
Peter Stephenson
0d5275c6b9 43409: Fix process group setting in main shell.
A newly forked subshell now reports back the process group it
will be using for the main shell to record.

This prevents an error where the shell incorrectly thought an
exiting process owned the terminal and so grabbed it back,
putting the foreground process into the background.
2018-09-07 17:49:35 +01:00
Anthony Sottile
1c4c7b6a4d
CVE-2018-0502, CVE-2018-13259: Fix two security issues in shebang line parsing.
See NEWS for more information.

Patch by Anthony Sottile and Buck Evan.
2018-09-03 15:07:47 +00:00
Peter Stephenson
3ad2ca3305 Don't handle ZLE functions for single key.
For read -k and read -q where we use ZLE, we just want a single
key and not full ZLE processing.  So don't handle timed
ZLE functions when preforming the read.
2018-09-03 10:09:22 +01:00
Oliver Kiddle
014eaf7e81 43358: enforce consistent patchlevel form 2018-08-31 23:34:11 +02:00
Peter Stephenson
3c93497eb7 43294: Add ZLE_RECURSIVE parameter. 2018-08-17 19:43:17 +01:00
dana
b21a641d4c 43275: Add log2 to match func 2018-08-13 09:36:55 +01:00
Peter Stephenson
f58b35bf88 43264: fix ${+assoc[nonexistent]} with KSH_ARRAYS 2018-08-09 09:48:35 +01:00
Peter Stephenson
225b35c907 43261: Fix unary minus with base.
Apply unary minus to a complete lexical constant rather than the
first component that comes along.
2018-08-08 17:11:54 +01:00
Jun-ichi Takimoto
ad9f07e66f 43227: fix memory leaks in term{cap,info}.c 2018-08-01 21:36:44 +09:00
Jun-ichi Takimoto
baedd62f0d 43219 (except term{cap,info}.c): fix several memory leaks 2018-07-31 22:15:58 +09:00
Peter Stephenson
e6f2d776d3 43225: Recalculate ZLE timeout.
Needed when looping owing to having handled a special fd.
2018-07-30 15:39:51 +01:00
Peter Stephenson
3e9fc32fc3 43156, 43157: Need to allow for extra space in gethere().
The point can now increment twice per iteration.
2018-07-10 14:42:02 +01:00
Peter Stephenson
17178db1a4 users/23531: Error exit/return fixes.
Fix regression with trap on left hand side of pipe.

Fix forced return from shell structure within nested function.

Fix tests exiting too early.

Add new test case.
2018-07-09 11:07:53 +01:00
Daniel Shahaf
3d7215cc82 43091: In the (u) glob qualifier, expand and correct "unknown user" error messages. 2018-06-25 11:18:41 +00:00
Peter Stephenson
0a6cb5078d 43084: Variable warning suppression enhancements.
Add vared -g option along the lines of typeset -g.

Set reply safely in zsh_directory_name_cdr.
2018-06-25 09:31:40 +01:00
dana
394f3a47e4 43075: Support nanosecond-precision time formatting
* Teach ztrftime() %9. and %N for nanoseconds
* Update prompt expansion to pass sub-second times for time formatting
* Update zsh/stat to pass sub-second times for atime/mtime/ctime

Patch heavily based on Oliver's earlier work @ workers/24059
2018-06-20 17:29:56 -05:00
Peter Stephenson
eada7e1138 43077: Fix shift builtin status.
If the math evaulation to get the shift count failed the status
wasn't passed back from the builtin.
2018-06-20 12:09:43 +01:00
Eitan Adler
f311619e30 433029: Testing signal return type is no longer needed 2018-06-18 10:18:29 +01:00
dana
796637362a 43039: Mark functions_source (et al.) for auto-loading 2018-06-17 20:34:17 -05:00
Peter Stephenson
9408c4825b users/23472: Add $sysparams[procsubstpid] to zsh/system 2018-06-15 15:02:36 +01:00
Peter Stephenson
f37c181b29 43008: Improve code to remove privileges.
Remove warnings of unused values as we always check the finally
result later.

Put segid before setuid as the setgid could fail if UID
no longer privileged.
2018-06-15 10:27:29 +01:00
Eitan Adler
96ec8cbbf4 42938: name argument to math_func is not unused 2018-06-06 09:35:38 +01:00
Eitan Adler
6a3b23e9cc 42939: pm argument to set_registers is not unused 2018-06-06 09:33:28 +01:00
Jun-ichi Takimoto
1a97dcbed1 42870: another improvement of 'compset -q'
zlemetall need not count the 'x' added at the cursor in set_comp_sep()
2018-05-31 21:07:53 +09:00
Jun-ichi Takimoto
e5f356a95e 42809: slightly improve 'compset -q' 2018-05-25 21:11:20 +09:00
Stephane Chazelas
5ac1c6f555 42790: make [[:blank:]] match non-ASCII blanks 2018-05-17 23:42:27 +02:00
Peter Stephenson
1d2f684c9b 42793: Always define FDT_PROC_SUBST even if not needed.
This avoids proliferating #ifdef's.
2018-05-17 10:00:37 +01:00
Peter Stephenson
ee7dda7806 42785: Allow redefining math function to work silently.
Previously it failed with an error message that the function
was already defined.  This is inconsistent with most other
aspects of shell usage.
2018-05-17 09:32:26 +01:00
dana
b066cc3ea9 42297: (e) subscript flag needs extra work with scalars 2018-05-14 16:54:19 +01:00
Peter Stephenson
449f13a467 42234: Stephane: don't kill a process if not running.
This could happen when kiiling a job.  The processs might be reused.
2018-05-14 16:47:29 +01:00
Oliver Kiddle
a93abe1170 42488: test cases for 42369 and address some issues in the code 2018-05-13 10:13:42 +02:00
Oliver Kiddle
373efa085d Nelson H. F. Beebe: 19597 (rebased 42369): return Inf, NaN etc from floating point operations instead of errors to allow non-stop IEEE 754 arithmetic 2018-05-13 10:02:01 +02:00
Oliver Kiddle
f0c2cf8607 42760: move stack variable outside while loop scope as it is accessed in the while condition 2018-05-13 09:51:05 +02:00
dana
eeeba19c96 42185: safety when removing separators in completion 2018-05-11 09:33:05 +01:00
dana
805192311f 42101 (tweaked): assigning shell status to array was broken 2018-05-11 09:29:14 +01:00
Peter Stephenson
c8ceb66ba3 42751: Protect shell status in ZLE timed function handler.
Otherwise status from sched and other asynchronous functions
could escape back to the main shell.
2018-05-08 10:18:19 +01:00
Peter Stephenson
faf0035e53 unposted (branch fork_early): Fork early for pipelines.
If executing a command not at the end of a pipeline, and
not optimised in the calling code, we can fork before
"prefork" substitutions, at the same point as
for background commands.

Move fork before our preliminary scan of arguments to find
a command: in the cases of early fork
we don't need this information before forking.

Ensure we _exit if forked in execcmd_exec().

Rationalise use of forks and pipes.

Ensure we _exit instead of returning from execcmd_exec() if we
have forked.  Before the optimisation code after the fork always ran
to the check at the end, but that code is overkill for the logic
between the early fork and the existing one.

Remove old workaround to fork in caller of execcmd for current shell
constructs as no longer needed with early fork below.

Close input of newly created pipe on fork (destined for RHS of pipe
which we never execute): this replaces a workaround from
zsh-workers/32171, commit 9887fc3d7b.

Set last1 on early fork as needed by some instances of shell
constructs on LHS of pipeline to know they are exiting.
2018-05-01 10:27:35 +01:00
Ricardo Giorni
f7519811e1 47201: fix 42355 for multiple backslashes 2018-04-29 12:05:39 -07:00
Daniel Shahaf
76b5b3a504 unposted: Correct process substitution buffer size in the PATH_DEV_FD codepath. 2018-04-25 15:31:39 +00:00
Peter Stephenson
95d861d028 42708: fix for process substitution.
Don't close associated file descriptors in the closem()
tidy up function as they should remain visible to external
processes.  Override if about to exit.

Unit test for the failing case: note this relies on the
existence of /proc/self/fd or equivalent.
2018-04-24 11:48:11 +01:00
Peter Stephenson
9ad9c5cda1 42705: Another safety fix for pgrp reclaiming.
Only do this if killpg(dead_pid, 0) returns -1, indicating
the pgprp doesn't exist any more, else there is a race
if other proceses have started using it.
2018-04-23 15:11:34 +01:00
Peter Stephenson
11f18457d2 Allow short loops with "while" 2018-04-23 13:45:08 +01:00
Peter Stephenson
9e2afb9298 42684 (with extra comments): Fork early if in bg.
In execcmd the case of running the last command in a pipeline
asynchronously for the purpose of & and &! is easy to work out,
and we can avoid side effects and unnecessary execution time in
the parent shell by forking earlier.
2018-04-20 10:36:39 +01:00
Peter Stephenson
0f29b5148e 42686: Fix previous pgrp patch.
We shouldn't do any fix ups unless the process has actually
exited.
2018-04-19 13:58:10 +01:00
Peter Stephenson
3c74891fcd 42630: Improve process group handling in pipelines.
If process group leader exits, allow a newly forked process to become
process leader.  If a foreground job, reattach the shell to the
terminal until that happens.

Unblock signals when reading output for command subsitution so that
we can do this reattaching immediately.
2018-04-17 17:14:20 +01:00
Barton E. Schaefer
68d9526220 42650: fix 42156 for zero-sized terminals
Also fix harmless no-op typo from hand-applying 42636 for previous commit.
2018-04-15 11:06:43 -07:00
Barton E. Schaefer
517cda3832 42636: fix GLOB_DOTS for !(RM_STAR_SILENT)
Also fix paste-o in older log entry
2018-04-15 10:57:27 -07:00
Oliver Kiddle
65b265f3c0 42624 (plus test): avoid freeing memory that's still needed
This was occurring in a multiple function definition where a
function name is duplicated.
2018-04-12 23:15:29 +02:00
Oliver Kiddle
8e6c1d8b47 42605: properly free the vi registers hash 2018-04-07 18:52:37 +02:00
Oliver Kiddle
d8753f47bb 42601: tidy up code for set -A/+A to not increment a NULL pointer and to be more efficient 2018-04-07 18:48:00 +02:00
Oliver Kiddle
31f7220563 42607, CVE-2018-1100: check bounds on buffer in mail checking 2018-04-07 18:28:38 +02:00
Oliver Kiddle
4044d73706 42600: error paths for _values leaked the exclusion list array 2018-04-07 14:37:46 +02:00
Oliver Kiddle
90afd36922 42597: plug memory leak found by coverity 2018-04-07 14:37:46 +02:00
Oliver Kiddle
bd05c4b2de 42595: remove dead code flagged by coverity 2018-04-07 14:37:46 +02:00
Oliver Kiddle
25da576c29 42575: fix to not complete options in the argument to another option 2018-04-05 11:14:58 +02:00
Peter Stephenson
3517e4a9a5 42581(?): Fix ZLE inline history expansion.
Seen with magic-space.

If there's a parse error in command subtitution we need to complete
reading history to ensure the command line buffer is finished.
2018-04-04 18:33:00 +01:00
Oliver Kiddle
bdf09270be 42560: silence sign-compare compiler warnings 2018-03-30 12:13:59 +02:00
Oliver Kiddle
c053c6a079 42539: prevent overflow of PATH_MAX-sized buffer in spelling correction 2018-03-28 09:00:58 +02:00
Martijn Dekker
fa0105f78c 42538: Temporarily set umask for here document.
Done while signals are queued.
2018-03-27 09:32:55 +01:00
Barton E. Schaefer
9bc391105f 42480: optimize $#var for single-byte character sets 2018-03-25 18:01:25 -07:00
Oliver Kiddle
259ac472ea 42519, CVE-2018-1083: check bounds on PATH_MAX-sized buffer used for file completion candidates 2018-03-24 15:04:39 +01:00
Oliver Kiddle
679b71ec4d 42518, CVE-2018-1071: check bounds when copying path in hashcmd() 2018-03-24 15:04:02 +01:00
Jun-ichi Takimoto
beadc29214 unposted: add 'static' to a file-local variable 2018-03-24 15:32:43 +09:00
Jun-ichi Takimoto
e4a8069b32 42501: avoid out of bound pointer (as 42487) 2018-03-24 15:22:10 +09:00
Peter Stephenson
bc349023aa 42487: Fix pointer problems in compctl.
Pointing off the front of a string caused warnings with
gcc 7.3.0 and is somewhat murky C anyway.
2018-03-21 10:29:22 +00:00
Stephane Chazelas
d2350a1e80 42469: necessary repairs to 42465 found by "make check" 2018-03-18 16:49:42 -07:00
Stephane Chazelas
1219eae829 42465: Pass up error status from readoutput().
This improves the consistency of error reporting from $(...) constructs.
2018-03-15 09:21:47 +00:00
Peter Stephenson
7fd8e380bf 42453: Fix race in look up of status for wait.
Background jobs that had just exited could still be in
the table when the process had already finished and the
status was recorded, causing the wrong status to be reported.
2018-03-12 15:26:34 +00:00
Martijn Dekker
54ea6a8cd5 42365: Use .zwc file if timestamp identical to source.
This can happen if the files are bundled together.
2018-03-05 09:31:11 +00:00
Taylor West
14c17aa178 42411: Assume current C librarires handle free(NULL) 2018-03-04 20:57:58 +00:00
Peter Stephenson
1d6954bd2f 23180: Fix expand-or-complete with ~[...].
The square brackets shouldn't be treated as wildcards.
2018-02-26 21:43:12 +00:00
Peter Stephenson
14743c0dfd 42401: workaround for gcc -foptimize-strlen oddit.
Use realloc(NULL, ...) instead of malloc in zsh-mem calloc().
2018-02-26 20:21:56 +00:00
Peter Stephenson
5b946f6c4d 42362: protect REPORTTIME logic from bad status 2018-02-17 22:35:32 +00:00