aboutsummaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorbug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277>2003-09-14 04:06:12 +0000
committerbug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277>2003-09-14 04:06:12 +0000
commit1ea68a2e2c72d6bb102d0d75b50c0e54b46b6542 (patch)
tree19d33618ba3c558cd34ab743fea1a2a52f6949d0 /init
parentd1c81d6a2ba79c55ede59f05c1cd46ee5f9806db (diff)
downloadbusybox-w32-1ea68a2e2c72d6bb102d0d75b50c0e54b46b6542.tar.gz
busybox-w32-1ea68a2e2c72d6bb102d0d75b50c0e54b46b6542.tar.bz2
busybox-w32-1ea68a2e2c72d6bb102d0d75b50c0e54b46b6542.zip
Patch from Rob Landley
Fixed a memory leak in add_cmd/add_cmd_str by moving the allocation of sed_cmd down to where it's actually first needed. In get_address, if index_of_next_unescaped_regexp_delim ever failed, we wouldn't notice because the return value was added to idx, which was already guaranteed to be > 0. (This is buried in the changes made when I redid get_address to be based on pointer arithmetic, because all the tests were gratuitously dereferencing with a constant zero, which wasn't obvious.) Comment in parse_regex_delim was wrong: 's' and 'y' both call it. The reason "sed_cmd->num_backrefs = 0;" isn't needed is that sed_cmd was allocated with cmalloc, which zeroes memory. Different handling of space after \ in i... Different handling of pattern "s/a/b s/c/d" Cool, resursive reads don't cause a crash. :) Fixed "sed -f blah filename - < filename" since GNU sed was handling both - and filenames on the same line. (You can even list - more than once, although it's immediate EOF...) git-svn-id: svn://busybox.net/trunk/busybox@7501 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions