[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 0/6] Off-by-one bug fix and clean up
From: |
Michael Witten |
Subject: |
[PATCH 0/6] Off-by-one bug fix and clean up |
Date: |
Mon, 28 Feb 2011 13:06:58 -0800 (PST) |
The parse_token_word() function (parse.y:4297) has a couple of off-by-one
assignments to the `token' array, which are really 2 manifestations of the
same bug.
These patches first mask the bug by solving the manifestations independently,
and then eradicate the bug by uniformly dismantling the noodliness in which
it is hiding.
Here is the entire patch series at a glance:
Solve the manifestations:
[PATCH 1/6] Bug: extglob: Fix off-by-one assignment in read_token_word()
[PATCH 2/6] Bug: shellexp: Fix off-by-one assignment in read_token_word()
Slice through the noodles:
[PATCH 3/6] Clean: parse_token_word(): relax memory requirements (off by
one)
[PATCH 4/6] Clean: More direct coupling between assignment and allocation
Extraneous tidying up:
[PATCH 5/6] Clean: Remove unnecessary xmalloc()/strcpy()
[PATCH 6/6] Clean: Remove unnecessary backslashes (line continuation)
All told, the changes are fairly minimal:
parse.y | 50 ++++++++++++++++++++++++++------------------------
1 files changed, 26 insertions(+), 24 deletions(-)
- [PATCH 0/6] Off-by-one bug fix and clean up,
Michael Witten <=
- [PATCH 1/6] Bug: extglob: Fix off-by-one assignment in read_token_word(), Michael Witten, 2011/02/28
- [PATCH 2/6] Bug: shellexp: Fix off-by-one assignment in read_token_word(), Michael Witten, 2011/02/28
- [PATCH 3/6] Clean: parse_token_word(): relax memory requirements (off by one), Michael Witten, 2011/02/28
- [PATCH 4/6] Clean: More direct coupling between assignment and allocation, Michael Witten, 2011/02/28
- [PATCH 5/6] Clean: Remove unnecessary xmalloc()/strcpy(), Michael Witten, 2011/02/28
- [PATCH 6/6] Clean: Remove unnecessary backslashes (line continuation), Michael Witten, 2011/02/28