]> git.sesse.net Git - ffmpeg/commitdiff
dnn/dnn_backend_native_layer_conv2d: Fix allocation size
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Wed, 9 Sep 2020 12:10:24 +0000 (14:10 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Wed, 9 Sep 2020 12:58:26 +0000 (14:58 +0200)
Found via ASAN with the dnn-layer-conv2d FATE-test.

Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavfilter/dnn/dnn_backend_native_layer_conv2d.c

index 777a54db43371e47b85d19f81743525b2d214ed8..c52725aa2b372680d14f2d42db3c79c9d9e172ee 100644 (file)
@@ -228,7 +228,7 @@ int dnn_execute_layer_conv2d(DnnOperand *operands, const int32_t *input_operand_
 
     //create threads
     for (int i = 0; i < thread_num; i++){
-        thread_param[i] = av_malloc(sizeof(thread_param));
+        thread_param[i] = av_malloc(sizeof(**thread_param));
         thread_param[i]->thread_common_param = &thread_common_param;
         thread_param[i]->thread_index = i;
         pthread_create(&thread_id[i], NULL, dnn_execute_layer_conv2d_thread, (void *)thread_param[i]);