Skip to content

Commit

Permalink
fix coverity issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabian Mauchle committed May 29, 2019
1 parent 687c8cd commit 74f39bd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rewrite.c
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,8 @@ int dorewritemodvattr(struct tlv *vendortlv, struct modattr *modvattr) {
for (offset = 4; offset < vendortlv->l; offset += ATTRLEN(vendortlv->v+offset)) {
if (ATTRTYPE(vendortlv->v+offset) == modvattr->t) {
tmpattr = maketlv(ATTRTYPE(vendortlv->v+offset), ATTRVALLEN(vendortlv->v+offset), ATTRVAL(vendortlv->v+offset));
if (!tmpattr)
return 0;
if (dorewritemodattr(tmpattr, modvattr)) {
int size_diff = tmpattr->l - ATTRVALLEN(vendortlv->v+offset);
int rem_size = vendortlv->l - offset - ATTRLEN(vendortlv->v+offset);
Expand Down

0 comments on commit 74f39bd

Please sign in to comment.