projects
/
platform
/
upstream
/
make.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4034f2b
)
Formerly commands.c.~17~
author
Roland McGrath
<roland@redhat.com>
Sun, 21 Feb 1993 20:05:54 +0000
(20:05 +0000)
committer
Roland McGrath
<roland@redhat.com>
Sun, 21 Feb 1993 20:05:54 +0000
(20:05 +0000)
commands.c
patch
|
blob
|
history
diff --git
a/commands.c
b/commands.c
index
5b8975f
..
0772946
100644
(file)
--- a/
commands.c
+++ b/
commands.c
@@
-44,11
+44,15
@@
set_file_variables (file)
if (ar_name (file->name))
{
+ unsigned int len;
p = index (file->name, '(');
at = (char *) alloca (p - file->name + 1);
bcopy (file->name, at, p - file->name);
at[p - file->name] = '\0';
- percent = p + 1;
+ len = strlen (p + 1);
+ percent = (char *) alloca (len);
+ bcopy (p + 1, percent, len - 1);
+ percent[len - 1] = '\0';
}
else
#endif /* NO_ARCHIVES. */