看板 DFBSD_commit 關於我們 聯絡資訊
commit 5b762f1a64d25a6e2e06009ede925a9c5057dc57 Author: Simon Schubert <corecode@dragonflybsd.org> Date: Mon Oct 26 11:28:35 2009 +0100 sh: fix spurious newline slips in backquote expansion From FreeBSD revision 1.43: Instead of eating trailing newlines after inserting them into the output buffer, don't insert them at all. This prevents a buffer *underrun* when the substitution consists completely of newlines (e.g. `echo`) and the byte before the source buffer to which p points is a '\n', in which case more characters would be removed from the output buffer than were inserted. DragonFly-bug: <http://bugs.dragonflybsd.org/issue1588> Summary of changes: bin/sh/expand.c | 17 ++++++++++++----- 1 files changed, 12 insertions(+), 5 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/5b762f1a64d25a6e2e06009ede925a9c5057dc57 -- DragonFly BSD source repository