Use snprintf() to pass checkAPI

svn path=/trunk/; revision=31506
This commit is contained in:
Martin Mathieson 2010-01-12 18:43:18 +00:00
parent 5e1f4c871e
commit d5c96e34e7
1 changed files with 2 additions and 2 deletions

View File

@ -2203,9 +2203,9 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
/* Show bytes too. There must be a nicer way of doing this! */
pdu_data = tvb_get_ptr(tvb, offset, pdu_lengths[n]);
for (i=0; i < data_length; i++) {
sprintf(buff+(i*2), "%02x", pdu_data[i]);
snprintf(buff+(i*2), 3, "%02x", pdu_data[i]);
if (i >= 30) {
sprintf(buff+(i*2), "...");
snprintf(buff+(i*2), 4, "...");
break;
}
}