Skip to content

Commit

Permalink
fixup! Fix issues reported by Coverity
Browse files Browse the repository at this point in the history
  • Loading branch information
Danielius1922 committed Sep 26, 2024
1 parent 1602616 commit 478ee6c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion api/oc_endpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,10 @@ oc_endpoint_to_cstring(const oc_endpoint_t *endpoint, char *buffer,
return -1;
}
// overflow check for coverity scan
assert(len <= INT_MAX - written && "Integer overflow detected");
// assert(len <= INT_MAX - written && "Integer overflow detected");
if (len > INT_MAX - written) {
return -1;
}
return len + written;
}

Expand Down

0 comments on commit 478ee6c

Please sign in to comment.