aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2017-08-20 18:16:52 -0700
committerChris Robinson <[email protected]>2017-08-20 18:16:52 -0700
commitbbabc9705ecc8996e97232191d2d5173b3b9c2f3 (patch)
treea0af1de2b22ac941eef9f47b45c5182d02234280
parent520938da5797b2cd06cb71d21d3cd644639e0fb6 (diff)
Ensure the arglist is properly terminated
-rw-r--r--utils/makehrtf.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/utils/makehrtf.c b/utils/makehrtf.c
index 4ce97283..c3786fdb 100644
--- a/utils/makehrtf.c
+++ b/utils/makehrtf.c
@@ -2808,7 +2808,6 @@ static int ProcessDefinition(const char *inName, const uint outRate, const uint
char rateStr[8+1], expName[MAX_PATH_LEN];
TokenReaderT tr;
HrirDataT hData;
- double *dfa;
FILE *fp;
int ret;
@@ -2858,7 +2857,7 @@ static int ProcessDefinition(const char *inName, const uint outRate, const uint
fclose(fp);
if(equalize)
{
- dfa = CreateArray(1 + (hData.mFftSize/2));
+ double *dfa = CreateArray(1 + (hData.mFftSize/2));
fprintf(stdout, "Calculating diffuse-field average...\n");
CalculateDiffuseFieldAverage(&hData, surface, limit, dfa);
fprintf(stdout, "Performing diffuse-field equalization...\n");
@@ -2932,7 +2931,7 @@ int wmain(int argc, const wchar_t *wargv[])
int i;
atexit(cleanup_arglist);
- arglist = calloc(sizeof(*arglist), argc);
+ arglist = calloc(sizeof(*arglist), argc+1);
for(i = 0;i < argc;i++)
arglist[i] = ToUTF8(wargv[i]);