Browse Source

Prevent alloc problem by casting sizes to size_t

Matthias Vogelgesang 9 years ago
parent
commit
147853927c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      reco.c

+ 1 - 1
reco.c

@@ -355,7 +355,7 @@ run_cached_reconstruction (Params *params, gchar **argv)
         UfoBaseScheduler *sched;
         GError *error = NULL;
 
-        params->cache = g_malloc (params->num_radios * params->width * params->height * sizeof (gfloat));
+        params->cache = g_malloc (((gsize) params->num_radios) * ((gsize) params->width) * ((gsize) params->height) * sizeof (gfloat));
 
         /* fill the cache and reconstruct simultaneously */
         radio_reader = make_task (data->pm, "reader");