Skip to content
Snippets Groups Projects
Commit 2d4594f9 authored by Morris Jette's avatar Morris Jette
Browse files

Fix data sign issue

Fix for possibly treating a negative number as a positive.
Problem reported by Coverity.
parent 627bd393
No related branches found
No related tags found
No related merge requests found
......@@ -136,7 +136,7 @@ static List _build_license_list(char *licenses, bool *valid)
tmp_str = xstrdup(licenses);
token = strtok_r(tmp_str, ",;", &last);
while (token && *valid) {
uint32_t num = 1;
int32_t num = 1;
for (i = 0; token[i]; i++) {
if (isspace(token[i])) {
*valid = false;
......@@ -147,7 +147,7 @@ static List _build_license_list(char *licenses, bool *valid)
*/
if ((token[i] == ':') || (token[i] == '*')) {
token[i++] = '\0';
num = (uint32_t)strtol(&token[i], &end_num,10);
num = (int32_t)strtol(&token[i], &end_num, 10);
}
}
if (num < 0) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment