Jun-ichi Takimoto
0f62e07c80
48389: getkeystring() should not return ptr to local var
...
Now it returns NULL if called with GETKEY_SINGLE_CHAR and next character
is not found. Caller must check the return value.
2021-04-06 23:05:03 +09:00
Mikael Magnusson
ea3351c496
48202 + 48366: Fix handling of NUL bytes in zexpandtabs multibyte version
2021-04-01 09:50:52 +02:00
Stephane Chazelas
d96c898101
47745: Fix [:IDENT:] vs posixidentifiers
...
wcsitype(c, IIDENT) should return false for non-ASCII characters
when the POSIX_IDENTIFIERS option is on, not the other way round.
2021-03-23 00:15:09 -05:00
Bart Schaefer
94e38548e3
45915: fix handling of hyphens in spckword()
2020-05-30 14:31:10 -07:00
Daniel Shahaf
deca7c9285
45730: _arguments: Add the -0 flag, which makes $opt_args be populated sanely.
...
Also, write/extend docstrings for sepjoin() and zjoin().
2020-05-03 01:27:36 +00:00
Cedric Ware
25c9b61a66
45708: zsh/system: Enable sub-second timeout in zsystem flock
2020-04-20 12:10:01 -05:00
Daniel Shahaf
fc286a7c11
45583/0008: Extend tests to prove that what remains of xsymlinks() handles symlink loops gracefully.
2020-03-25 23:49:02 +00:00
Daniel Shahaf
dabfd1f1fb
45583/0007: Remove code that is now unreachable.
2020-03-25 23:49:02 +00:00
Daniel Shahaf
12347c26ce
45583/0006: Don't use xsymlinks() in 'whence -s'.
2020-03-25 23:49:02 +00:00
Daniel Shahaf
47fc5fe01f
45583/0004: Fix segfault on resolving symlink loops
2020-03-25 23:49:02 +00:00
Peter Stephenson
2b1e5a3d22
45563: %z can be used for zlong in warnings and errors
2020-03-22 18:45:02 +00:00
Jun-ichi Takimoto
0bc1edef5a
45536: fix handling of 8bit character under C-locale
...
correctly escape unprintable 8bit character by using \M-
2020-03-17 15:11:04 +09:00
Peter Stephenson
a6a1b28b98
45487: Missing mod_export declarations for AIX
2020-02-24 10:55:48 +00:00
dana
ed21a7b700
unposted: zerrmsg(): Fix macro guard missed in previous commit
2019-12-26 14:57:07 -06:00
Daniel Shahaf
81185f4c61
internal: Allow %L in zerrmsg() in non-debug builds, too.
...
This will let error messages include long integers.
2019-12-26 11:49:45 +00:00
Daniel Shahaf
3c4b3c8798
45064: Fix the mktemp() warning, in debug builds only.
...
On Linux, linking to mktemp() generates the following warning:
.
utils.o: In function `gettempname':
./Src/utils.c:2229: warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
The warning cannot be disabled.
Work around that by using mkstemp() instead, and massage its output so
it behaves like mktemp(). See the new comment for further details.
2019-12-18 06:01:47 +00:00
Jun-ichi Takimoto
a98e13ed1f
44714: Take account of CDABLE_VARS while checking spelling
2019-08-29 18:21:50 +09:00
Oliver Kiddle
3de2333b08
44307: allow for atoi() returning a negative number
2019-05-20 00:14:01 +02: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
Kamil Dudka
d50e204b0c
43790: failed mailstat could leak memory
2018-11-09 11:06:08 +00:00
Daniel Shahaf
bf9da44931
unposted: internals: Document sepjoin().
2018-10-14 14:02:34 +00: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
Jun-ichi Takimoto
ad9f07e66f
43227: fix memory leaks in term{cap,info}.c
2018-08-01 21:36:44 +09: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
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
31f7220563
42607, CVE-2018-1100: check bounds on buffer in mail checking
2018-04-07 18:28:38 +02:00
Oliver Kiddle
bd05c4b2de
42595: remove dead code flagged by coverity
2018-04-07 14:37:46 +02: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
679b71ec4d
42518, CVE-2018-1071: check bounds when copying path in hashcmd()
2018-03-24 15:04:02 +01:00
Peter Stephenson
2cbf6b6a19
42332: Special case unsigned printf formats.
...
For constants we can avoid a conversion to signed by examining
the expression before passing to math eval.
2018-01-31 09:14:40 +00:00
Peter Stephenson
5f6a52c06c
42156: new CHECK_RUNNING_JOBS option demanded by bash groupies
...
Also new job options.
Also suppress debug error if rows or columns are reported as zero as
this is normal without a physical terminal.
2017-12-22 20:21:23 +00:00
Daniel Shahaf
ced82745ea
unposted (cf. 41672): checkrmall: Record the 41672 bug in a TODO.
2017-09-21 18:17:19 +00:00
Daniel Shahaf
15bed0db40
unposted (cf. 41707): internal: Document the count==0 case of checkrmall().
2017-09-21 18:14:01 +00:00
Daniel Shahaf
ed7497e379
unposted: internal: Document zreaddir().
2017-09-11 15:06:08 +00:00
Peter Stephenson
a9b579a9d3
Revert "41499 (with one further tweak): POSIX_STRINGS behaviour."
...
This reverts commit 2eacbef919
.
Conflicts:
ChangeLog
2017-08-08 19:04:49 +01:00
Peter Stephenson
2eacbef919
41499 (with one further tweak): POSIX_STRINGS behaviour.
...
Ignore a terminating delimiter when splitting as separators
despite being called separators are terminators.
2017-08-07 18:47:43 +01:00
Martijn Dekker
a51cd62b45
41484: Make ${(q+)...} quote backsleshes.
2017-08-03 21:32:20 +01:00
Peter Stephenson
e8edd42f7f
22760: fix partial string length reports with NO_MULTIBYTE
2017-07-02 20:29:00 +01:00
Jun-ichi Takimoto
171e7fa4c1
41090: Replace iswprint() if unicode9 is enabled.
...
If wcwidth() or iswprint() is broken, force enable unicode9.
2017-05-12 12:10:13 +09:00
Peter Stephenson
c7a9cf465d
40181: Fix buffer overrun in xsymlinks.
...
There was no check for copying to the internal xbuf2 for a
preliminary test.
2017-05-09 17:49:18 +01:00
Jun-ichi Takimoto
3c78f14d5c
40994: unmeta_one() need not count Meta
2017-04-23 23:58:44 +09:00
Orlov Sergey
a11b241d4a
40935: User names need metafying.
...
On some systems they can contain 8-bit characters and on all systems
this is logically correct anyway.
2017-04-10 09:55:06 +01:00
Barton E. Schaefer
071017965f
40763: count wide characters and Cmatcher pointers more sanely in cfp_matcher_pats(), and count characters in pattern_match() the same way to stay in sync
...
Might not fix wide-char matching in completion matcher-lists but should
avoid wild pointer crash
2017-03-08 21:26:55 -08:00
Peter Stephenson
f3f8537cfa
40760: Always tokenize unquoted - to Dash.
...
This fixes use of pattern match character ranges in unusual contexts.
Attempt to detect a tokenized - in cases where we don't care.
2017-03-07 10:43:58 +00:00
Daniel Shahaf
b3a88a53d3
39982: $SPROMPT: Don't accept a spelling correction at space/tab.
...
The patch also downscopes a couple of local variables, with no
functional change.
2016-11-24 08:18:28 +00:00