Bash-4.3 distribution sources and documentation
This commit is contained in:
parent
4539d736f1
commit
ac50fbac37
497 changed files with 129395 additions and 87598 deletions
|
@ -133,7 +133,7 @@ substring (string, start, end)
|
|||
|
||||
len = end - start;
|
||||
result = (char *)xmalloc (len + 1);
|
||||
strncpy (result, string + start, len);
|
||||
memcpy (result, string + start, len);
|
||||
result[len] = '\0';
|
||||
return (result);
|
||||
}
|
||||
|
@ -158,7 +158,7 @@ strsub (string, pat, rep, global)
|
|||
if (replen)
|
||||
RESIZE_MALLOCED_BUFFER (temp, templen, replen, tempsize, (replen * 2));
|
||||
|
||||
for (r = rep; *r; )
|
||||
for (r = rep; *r; ) /* can rep == "" */
|
||||
temp[templen++] = *r++;
|
||||
|
||||
i += patlen ? patlen : 1; /* avoid infinite recursion */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue