Lines Matching refs:bad_bytes
562 size_t bad_bytes = 0;
565 while ((conn->read_size-bad_bytes) >= sizeof(struct pptp_header)) {
567 header = (struct pptp_header *) (conn->read_buffer + bad_bytes);
575 if (ntoh16(header->length) > (conn->read_size-bad_bytes))
587 memcpy(*buf, conn->read_buffer + bad_bytes, *size);
589 conn->read_size -= (bad_bytes + *size);
590 memmove(conn->read_buffer, conn->read_buffer + bad_bytes + *size,
592 if (bad_bytes > 0)
593 log("%lu bad bytes thrown away.", (unsigned long) bad_bytes);
596 bad_bytes++;
600 conn->read_size -= bad_bytes;
601 memmove(conn->read_buffer, conn->read_buffer + bad_bytes, conn->read_size);
602 if (bad_bytes > 0)
603 log("%lu bad bytes thrown away.", (unsigned long) bad_bytes);