X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2Ftar.c;h=7a16c3530c432754af1aea5a8f5734728fe55c6e;hb=a5bcafe8818a542d15bad6c743ab9629173cda77;hp=c439df5ee304363e36ba8b889c501cdeab79e7e3;hpb=ccba255632849ba378f36d46df79adeb8ae7920b;p=chaz%2Ftar diff --git a/src/tar.c b/src/tar.c index c439df5..7a16c35 100644 --- a/src/tar.c +++ b/src/tar.c @@ -303,7 +303,7 @@ options(argc, argv) /* Set default option values */ blocking = DEFBLOCKING; /* From Makefile */ - ar_files = malloc (sizeof (char *) * 10); + ar_files = (char **) malloc (sizeof (char *) * 10); ar_files_len = 10; n_ar_files = 0; cur_ar_file = 0; @@ -401,8 +401,9 @@ options(argc, argv) #endif if (n_ar_files == ar_files_len) ar_files - = (sizeof (char *) - * (ar_files_len *= 2)); + = (char **) + ck_malloc (sizeof (char *) + * (ar_files_len *= 2)); ar_files[n_ar_files++]=buf; } break; @@ -445,8 +446,8 @@ options(argc, argv) case 'f': /* Use ar_file for the archive */ if (n_ar_files == ar_files_len) ar_files - = (sizeof (char *) - * (ar_files_len *= 2)); + = (char **) ck_malloc (sizeof (char *) + * (ar_files_len *= 2)); ar_files[n_ar_files++] = optarg; break;