From 0c00bc40bed5f208d348f614657aac9aed63e560 Mon Sep 17 00:00:00 2001 From: SuYeon Date: Wed, 21 Jun 2023 15:51:14 +0900 Subject: [PATCH] [Fix] fix svace issue. Fix overflow before widen (distance value in 'g_array_set_size' func). Signed-off-by: SuYeon --- ext/nnstreamer/tensor_decoder/tensordec-boundingbox.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/nnstreamer/tensor_decoder/tensordec-boundingbox.c b/ext/nnstreamer/tensor_decoder/tensordec-boundingbox.c index 0bafa3f..8e781ec 100644 --- a/ext/nnstreamer/tensor_decoder/tensordec-boundingbox.c +++ b/ext/nnstreamer/tensor_decoder/tensordec-boundingbox.c @@ -1297,8 +1297,8 @@ update_centroids (void **pdata, GArray * boxes) int bcy = box->y + box->height / 2; d->distance = - (guint64) ((c->cx - bcx) * (c->cx - bcx)) - + (guint64) ((c->cy - bcy) * (c->cy - bcy)); + (guint64) (c->cx - bcx) * (c->cx - bcx) + + (guint64) (c->cy - bcy) * (c->cy - bcy); } } } -- 2.7.4