]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC r242766: sh: Fix two issues when an alias is redefined:
authorjilles <jilles@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 22 Nov 2012 13:50:51 +0000 (13:50 +0000)
committerjilles <jilles@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 22 Nov 2012 13:50:51 +0000 (13:50 +0000)
commitc1d5ff620b457cde5520ceb491c847b4ca88dfe8
tree5248e482a20cfdcec54ea38dc93a4d5e8f57aca8
parentc19392552c47bf0189221e0eca12f6345f9488bc
MFC r242766: sh: Fix two issues when an alias is redefined:

 * The last character is not displayed.
 * If the alias ends with itself (as a word), an infinite memory-eating loop
   occurs.

If an alias is defined initially, a space is appended to avoid recursion but
this did not happen when an alias was later modified.

PR: bin/173418
Submitted by: Daniel F.

git-svn-id: svn://svn.freebsd.org/base/stable/9@243402 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
bin/sh/alias.c