Prevent a possible negative value of an argument 27/307427/2 accepted/tizen/unified/20240311.170354 accepted/tizen/unified/x/20240313.092056
authorSung-hun Kim <sfoon.kim@samsung.com>
Fri, 8 Mar 2024 05:57:10 +0000 (14:57 +0900)
committerSung-hun Kim <sfoon.kim@samsung.com>
Fri, 8 Mar 2024 07:32:20 +0000 (16:32 +0900)
commitdf2a14896ba7c85b3169cab78a2d8cc569fba707
tree84a964407d609a7af3294c479a5b362a40c21a2b
parentb97eaaeb378cf6f254d73f62f14262a1e6d4cb73
Prevent a possible negative value of an argument

If a given argument len has a negative value, it can incur infinite loop.

This patch fixes a coverity issue (cid: 1757405).

Change-Id: Iaafad7cd1afe899de5ec2441ef58398927a472e2
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
src/shared/util.c