zsh-workers
 help / color / mirror / code / Atom feed
* RE: Recommend latex surgical gloves
@ 2015-08-20 11:15 ED
  2015-08-20 16:42 ` 5.0.9 / 5.1 agani (ws Re: Recommend latex surgical gloves) Peter Stephenson
  0 siblings, 1 reply; 23+ messages in thread
From: ED @ 2015-08-20 11:15 UTC (permalink / raw)
  To: zsh-workers


[-- Attachment #1.1: Type: text/plain, Size: 630 bytes --]

|   |
|   |
| |
|
Dear My Friend


Glad to find your email address from Google.
We supply Latex Surgical Gloves to global market.
Per my visiting your company web, I found that you have several chain store.
It is our pleasure to find a way to cooperate with you.
Quotations & Samples could be sent on request.
Any further questions, please do not hesitate to inform us.


Thanks & Regards
Ed
--

Time flies and life is short. Don’t forget to stop to smell the flowers.


YANGZHOU RUICHENG  MEDICA COMPANY
Add: Room 1310, Yatai Building, Museum Road 545#, Yangzhou, Jiangsu, China.
Skype: ed.young1227











|
| |
|   | |   |

[-- Attachment #1.2: Type: text/html, Size: 4815 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread
* mkdir builtin and $'\0'
@ 2015-08-18  9:19 Stephane Chazelas
  2015-08-18  9:49 ` Peter Stephenson
                   ` (2 more replies)
  0 siblings, 3 replies; 23+ messages in thread
From: Stephane Chazelas @ 2015-08-18  9:19 UTC (permalink / raw)
  To: Zsh hackers list

$ zsh --version
zsh 5.0.8 (x86_64-pc-linux-gnu)
$ strace -e mkdir zsh -c "zmodload zsh/files; mkdir $'a\0b'"
mkdir("a\203 b", 0755)                  = -1 EEXIST (File exists)
zsh:mkdir:1: cannot make directory `a^@b': file exists
+++ exited with 1 +++

See how that $'\0' became "\203 " except in the error message.

Not a big problem in that nothing good will ever come out of
mkdir $'\0' anyway since one can't pass a NUL character to the
mkdir() system call.

A bit worse:

$ strace -e chdir zsh -c "cd $'a\0b'; print -r -- \$PWD; pwd"
chdir("/export/home/stephane/a")        = -1 ENOENT (No such file or directory)
chdir("a\203 b")                        = 0
chdir("..")                             = 0
chdir("..")                             = 0
chdir("..")                             = 0
chdir("/home/stephane/a\203 b")         = 0
/export/home/stephane/a
/home/stephane/a� b
+++ exited with 0 +++

I suppose the chdir("..")s come after the realisation that $PWD
probably doesn't represent the current directory anymore (since
chdir("$PWD/dir") doesn't work while chdir("dir") does).

"mv" at least doesn't have the problem. A note though:

$ strace -e rename zsh -c "zmodload zsh/files; mv $'a\0b' x"
rename("a", "x/a")                      = -1 ENOENT (No such file or directory)
zsh:mv:1: a^@b: no such file or directory
+++ exited with 1 +++

The error message mentions a^@b not existing while it did
attempt to rename "a" instead.

Maybe those builtins should fail with an error if one attempts
to call them with an argument containing NUL.

-- 
Stephane


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2015-09-04 13:49 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-20 11:15 Recommend latex surgical gloves ED
2015-08-20 16:42 ` 5.0.9 / 5.1 agani (ws Re: Recommend latex surgical gloves) Peter Stephenson
2015-08-20 17:25   ` Bart Schaefer
2015-08-21  3:38   ` Mikael Magnusson
2015-09-04 13:44     ` mkdir builtin and $'\0' Oliver Kiddle
  -- strict thread matches above, loose matches on Subject: below --
2015-08-18  9:19 Stephane Chazelas
2015-08-18  9:49 ` Peter Stephenson
2015-08-18 11:11   ` Stephane Chazelas
2015-08-18 11:27     ` Peter Stephenson
2015-08-18 12:55       ` Stephane Chazelas
2015-08-18 13:24         ` Peter Stephenson
2015-08-18 14:21           ` Peter Stephenson
2015-08-18 15:07             ` Peter Stephenson
2015-08-18 15:18               ` Peter Stephenson
2015-08-18 15:19               ` Mikael Magnusson
2015-08-19  9:52             ` Peter Stephenson
2015-08-19 13:10               ` Stephane Chazelas
2015-08-18 11:06 ` Peter Stephenson
2015-08-18 16:20 ` Stephane Chazelas
2015-08-18 16:37   ` Peter Stephenson
2015-08-21  6:20     ` Mikael Magnusson
2015-08-21  8:57       ` Peter Stephenson
2015-08-21 14:09         ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).