From f060d69004ddb7bc7938bdfd0fe212275daf4a7e Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Thu, 23 May 2013 16:18:58 +0200 Subject: [PATCH] Fix two security issues --- separation/src/io_util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/separation/src/io_util.c b/separation/src/io_util.c index 64f5b207e..23f34b24f 100644 --- a/separation/src/io_util.c +++ b/separation/src/io_util.c @@ -70,7 +70,7 @@ real* fread_double_array(FILE* file, const char* array_name, unsigned int* sizeO int rc; real* arr; - fscanf(file, array_name); + fscanf(file, "%s", array_name); fscanf(file, "[%u]: ", &size); arr = (real*) mwMalloc(sizeof(real) * size); @@ -101,7 +101,7 @@ int* fread_int_array(FILE *file, const char *array_name, unsigned int* sizeOut) unsigned int i, size; int* arr; - fscanf(file, array_name); + fscanf(file, "%s", array_name); fscanf(file, "[%u]: ", &size); arr = (int*) mwMalloc(sizeof(int) * size);