33 return rand_word() % (max + 1 - min) + min;
65 else if (w & 0x400000)
67 else if (w & 0x200000)
80 for (; count > 0; count--)
91 while(stream.bytes_written < min_bytes)
122 if (min_bytes > stream.bytes_written)
123 len =
rand_len(min_bytes - stream.bytes_written);
135 return stream.bytes_written;
164 memcpy(buf + s + l, buf + s, l);
179 size_t max_size = bufsize - 32 - *msglen;
MOSAPI void * memmove(void *dest, const void *src, size_t n)
void * malloc_with_check(size_t size)
void free_with_check(void *mem)
bool pb_encode_varint(pb_ostream_t *stream, uint64_t value)
bool pb_write(pb_ostream_t *stream, const pb_byte_t *buf, size_t count)
pb_ostream_t pb_ostream_from_buffer(pb_byte_t *buf, size_t bufsize)
bool pb_encode_fixed64(pb_ostream_t *stream, const void *value)
bool pb_encode_tag(pb_ostream_t *stream, pb_wire_type_t wiretype, uint32_t field_number)
bool pb_encode_fixed32(pb_ostream_t *stream, const void *value)
static void * memcpy(void *s1, const void *s2, size_t n)
unsigned long long uint64_t
size_t rand_len(size_t max)
void random_set_seed(uint32_t seed)
uint32_t random_get_seed()
void rand_fill(uint8_t *buf, size_t count)
size_t rand_fill_protobuf(uint8_t *buf, size_t min_bytes, size_t max_bytes, int min_tag)
static uint32_t g_random_seed
void rand_mess(uint8_t *buf, size_t count)
int rand_int(int min, int max)
void rand_protobuf_noise(uint8_t *buffer, size_t bufsize, size_t *msglen)