From 581c6d644bbe6f4d4187fbb4d38b61db2b9f3c3c Mon Sep 17 00:00:00 2001 From: MyungJoo Ham Date: Mon, 1 Apr 2019 16:25:22 +0900 Subject: [PATCH] [SVACE/414609] Fix 65505016 Warning Line 249 of tensordec-boundingbox.c has the following SVACE warning: Warning Message Possible integer underflow: left operand is tainted. An integer underflow may occur due to arithmetic operation (unsigned subtraction) between values { [0, 1073741823] } and '1', where the first value comes from the expression 'strlen(line)' Signed-off-by: MyungJoo Ham --- ext/nnstreamer/tensor_decoder/tensordec-boundingbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/nnstreamer/tensor_decoder/tensordec-boundingbox.c b/ext/nnstreamer/tensor_decoder/tensordec-boundingbox.c index f233211..d4f208a 100644 --- a/ext/nnstreamer/tensor_decoder/tensordec-boundingbox.c +++ b/ext/nnstreamer/tensor_decoder/tensordec-boundingbox.c @@ -245,7 +245,7 @@ loadImageLabels (bounding_boxes * data) GList *labels = NULL, *cursor; while ((read = getline (&line, &len, fp)) != -1) { - if (line) { + if (line && strlen (line) >= 1) { if (line[strlen (line) - 1] == '\n') { line[strlen (line) - 1] = '\0'; } -- 2.7.4