From 12d7db8b4973551cd8f0f2b43f3d9e9165b455b4 Mon Sep 17 00:00:00 2001 From: Rico van Genugten Date: Thu, 6 Oct 2016 11:28:34 +0000 Subject: [PATCH] Fixed issue simonyiszk/csdr#15 by fixing allocating size in bytes instead of size in amount of taps --- csdr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/csdr.c b/csdr.c index ec08e27..b2b8678 100644 --- a/csdr.c +++ b/csdr.c @@ -940,7 +940,7 @@ int main(int argc, char *argv[]) padded_taps_length = taps_length+(NEON_ALIGNMENT/4)-1 - ((taps_length+(NEON_ALIGNMENT/4)-1)%(NEON_ALIGNMENT/4)); fprintf(stderr,"padded_taps_length = %d\n", padded_taps_length); - taps = (float*) (float*)malloc(padded_taps_length+NEON_ALIGNMENT); + taps = (float*) (float*)malloc((padded_taps_length+NEON_ALIGNMENT)*sizeof(float)); fprintf(stderr,"taps = %x\n", taps); taps = (float*)((((unsigned)taps)+NEON_ALIGNMENT-1) & ~(NEON_ALIGNMENT-1)); fprintf(stderr,"taps = %x\n", taps);