|
/* Read the rest of the data -- for a bit of safety so we don't read too far, do some math to figure out exactly what's left. */ |
Line 353, was:
/* Read the rest of the data -- for a bit of safety so we don't read too far, do some math to figure out exactly what's left. */ buffer_read_next_bytes(buffer, dns->answers[i].answer->NBSTAT.stats, MIN(64, size - 1 - (dns->answers[i].answer->NBSTAT.name_count * 16)));
Replace 16 to 18:
/* My redact - buffer_read_next_bytes(buffer, tmp, 16) = read from buffer 16 byte, and buffer_read_next_int16(buffer) = read from buffer 2 byte; 16+2 = 18*/ /* Read the rest of the data -- for a bit of safety so we don't read too far, do some math to figure out exactly what's left. */ buffer_read_next_bytes(buffer, dns->answers[i].answer->NBSTAT.stats, MIN(64, size - 1 - (dns->answers[i].answer->NBSTAT.name_count * (18) )));
Also Line 464, replace 16 to 18:
/* Read the rest of the data -- for a bit of safety so we don't read too far, do some math to figure out exactly what's left. */ buffer_read_next_bytes(buffer, dns->additionals[i].additional->NBSTAT.stats, MIN(64, size - 1 - (dns->additionals[i].additional->NBSTAT.name_count * 16)));
Change to:
/* My redact - buffer_read_next_bytes(buffer, tmp, 16) = read from buffer 16 byte, and buffer_read_next_int16(buffer) = read from buffer 2 byte; 16+2 = 18*/ /* Read the rest of the data -- for a bit of safety so we don't read too far, do some math to figure out exactly what's left. */ buffer_read_next_bytes(buffer, dns->additionals[i].additional->NBSTAT.stats, MIN(64, size - 1 - (dns->additionals[i].additional->NBSTAT.name_count * 18)));
Thank u so much for ur code - it was very useful for me.
=)
nbtool/dns.c
Line 353 in bf90c76
Line 353, was:
/* Read the rest of the data -- for a bit of safety so we don't read too far, do some math to figure out exactly what's left. */ buffer_read_next_bytes(buffer, dns->answers[i].answer->NBSTAT.stats, MIN(64, size - 1 - (dns->answers[i].answer->NBSTAT.name_count * 16)));Replace 16 to 18:
/* My redact - buffer_read_next_bytes(buffer, tmp, 16) = read from buffer 16 byte, and buffer_read_next_int16(buffer) = read from buffer 2 byte; 16+2 = 18*/ /* Read the rest of the data -- for a bit of safety so we don't read too far, do some math to figure out exactly what's left. */ buffer_read_next_bytes(buffer, dns->answers[i].answer->NBSTAT.stats, MIN(64, size - 1 - (dns->answers[i].answer->NBSTAT.name_count * (18) )));Also Line 464, replace 16 to 18:
/* Read the rest of the data -- for a bit of safety so we don't read too far, do some math to figure out exactly what's left. */ buffer_read_next_bytes(buffer, dns->additionals[i].additional->NBSTAT.stats, MIN(64, size - 1 - (dns->additionals[i].additional->NBSTAT.name_count * 16)));Change to:
/* My redact - buffer_read_next_bytes(buffer, tmp, 16) = read from buffer 16 byte, and buffer_read_next_int16(buffer) = read from buffer 2 byte; 16+2 = 18*/ /* Read the rest of the data -- for a bit of safety so we don't read too far, do some math to figure out exactly what's left. */ buffer_read_next_bytes(buffer, dns->additionals[i].additional->NBSTAT.stats, MIN(64, size - 1 - (dns->additionals[i].additional->NBSTAT.name_count * 18)));Thank u so much for ur code - it was very useful for me.
=)