Skip to content

Commit

Permalink
Merge pull request #97 from exharrison/bugfix/fix_type_string_truncation
Browse files Browse the repository at this point in the history
Updating the position of the null terminator in the case for the stri…
  • Loading branch information
alandekok authored Aug 29, 2019
2 parents ef05709 + 6c56d9c commit ccdff6b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/avpair.c
Original file line number Diff line number Diff line change
Expand Up @@ -770,10 +770,7 @@ int rc_avpair_tostr (rc_handle const *rh, VALUE_PAIR *pair, char *name, int ln,
}
ptr++;
}
if (lv > 0)
value[pos++] = 0;
else
value[pos-1] = 0;
value[pos] = 0;
break;

case PW_TYPE_INTEGER:
Expand Down

0 comments on commit ccdff6b

Please sign in to comment.