Lines Matching refs:bad_bytes
581 size_t bad_bytes = 0;
584 while ((conn->read_size-bad_bytes) >= sizeof(struct pptp_header)) {
586 header = (struct pptp_header *) (conn->read_buffer + bad_bytes);
594 if (ntoh16(header->length) > (conn->read_size-bad_bytes))
606 memcpy(*buf, conn->read_buffer + bad_bytes, *size);
608 conn->read_size -= (bad_bytes + *size);
609 memmove(conn->read_buffer, conn->read_buffer + bad_bytes + *size,
611 if (bad_bytes > 0)
612 log("%lu bad bytes thrown away.", (unsigned long) bad_bytes);
615 bad_bytes++;
619 conn->read_size -= bad_bytes;
620 memmove(conn->read_buffer, conn->read_buffer + bad_bytes, conn->read_size);
621 if (bad_bytes > 0)
622 log("%lu bad bytes thrown away.", (unsigned long) bad_bytes);