From ce8a0a9fd5bfcbe3c34d2967e2e1c3500766e3f1 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 12 Sep 2012 03:45:26 -0700 Subject: [PATCH] Use PATH_MAX for the fname length --- Alc/hrtf.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Alc/hrtf.c b/Alc/hrtf.c index ec9bf707..f743156c 100644 --- a/Alc/hrtf.c +++ b/Alc/hrtf.c @@ -29,6 +29,12 @@ #include "alSource.h" #include "alu.h" + +#ifndef PATH_MAX +#define PATH_MAX 4096 +#endif + + /* Current data set limits defined by the makehrtf utility. */ #define MIN_IR_SIZE (8) #define MAX_IR_SIZE (128) @@ -359,7 +365,7 @@ static struct Hrtf *LoadHrtf(ALuint deviceRate) ALushort *evOffset = NULL; ALshort *coeffs = NULL; ALubyte *delays = NULL; - char fname[256 + 1]; + char fname[PATH_MAX]; ALchar magic[9]; ALuint i, j; FILE *f; -- 2.11.4.GIT