diff options
author | DJ Delorie <dj@delorie.com> | 2005-04-14 02:22:18 +0000 |
---|---|---|
committer | DJ Delorie <dj@delorie.com> | 2005-04-14 02:22:18 +0000 |
commit | ff70f729920e9abd1e8351ea9d2f0383823ac621 (patch) | |
tree | dd6504f504735aefef4508f5b1842f308765a642 /libiberty | |
parent | 88b9eeb5648014b523ec49c3a2c7709ac566e374 (diff) | |
download | binutils-redhat-ff70f729920e9abd1e8351ea9d2f0383823ac621.tar.gz |
merge from gcc
Diffstat (limited to 'libiberty')
-rw-r--r-- | libiberty/ChangeLog | 5 | ||||
-rw-r--r-- | libiberty/argv.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index bdede48bbc..d06406a3e8 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,8 @@ +2005-04-13 Gabriel Dos Reis <gdr@integrable-solutions.net> + + * argv.c (dupargv): Allocate space of argv[argc], not + sizeof(char *) of that amount. Cast result to char *. + 2005-04-12 Gabriel Dos Reis <gdr@integrable-solutions.net> * regex.c (wcs_re_match_2_internal, byte_re_match_2_internal): diff --git a/libiberty/argv.c b/libiberty/argv.c index 76502058d3..ad4c9a7938 100644 --- a/libiberty/argv.c +++ b/libiberty/argv.c @@ -77,7 +77,7 @@ dupargv (char **argv) for (argc = 0; argv[argc] != NULL; argc++) { int len = strlen (argv[argc]); - copy[argc] = malloc (sizeof (char *) * (len + 1)); + copy[argc] = (char *) malloc (len + 1); if (copy[argc] == NULL) { freeargv (copy); |