zsh-workers
 help / color / mirror / code / Atom feed
* Memory access bug with negative subscripts
@ 2007-07-25  4:52 Bart Schaefer
  2007-07-25  9:22 ` Peter Stephenson
  0 siblings, 1 reply; 2+ messages in thread
From: Bart Schaefer @ 2007-07-25  4:52 UTC (permalink / raw)
  To: zsh-workers

This bug appears at least as far back as zsh 3.0.5, and probably longer
ago.  Still happens in the latest CVS co from SourceForge.

x=x
x[-10]=y
print $x

I can't predict what you'll see, but unless you get very lucky it won't
be what you ought to see.  For example,

torch% x[-$RANDOM]=z
torch% print $x
zpasswd

I imagine running that under ElectricFence or some similar memory checker
would be instructive.


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

end of thread, other threads:[~2007-07-25  9:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-25  4:52 Memory access bug with negative subscripts Bart Schaefer
2007-07-25  9:22 ` 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).