/nanopb-2.7.6/tests/common/ |
D | malloc_wrappers.c | 12 #define GUARD_SIZE (sizeof(size_t)*3) 13 #define PREFIX_SIZE (sizeof(size_t)*2) 14 #define CHECK1 ((size_t)0xDEADBEEF) 15 #define CHECK2 ((size_t)0x600DCAFE) 25 static size_t g_alloc_count = 0; 26 static size_t g_alloc_bytes = 0; 27 static size_t g_max_alloc_bytes = MAX_ALLOC_BYTES; 35 static size_t round_blocksize(size_t size) in round_blocksize() 47 static size_t round_blocksize(size_t size) in round_blocksize() 54 void* malloc_with_check(size_t size) in malloc_with_check() [all …]
|
D | malloc_wrappers.h | 3 void* malloc_with_check(size_t size); 5 void* realloc_with_check(void *ptr, size_t size); 6 size_t get_alloc_count(); 7 size_t get_allocation_size(const void *mem); 8 size_t get_alloc_bytes(); 9 void set_max_alloc_bytes(size_t max_bytes); 10 size_t get_max_alloc_bytes();
|
/nanopb-2.7.6/tests/fuzztest/ |
D | random_data.h | 27 size_t rand_len(size_t max); 30 void rand_fill(uint8_t *buf, size_t count); 33 size_t rand_fill_protobuf(uint8_t *buf, size_t min_bytes, size_t max_bytes, int min_tag); 36 void rand_mess(uint8_t *buf, size_t count); 39 void rand_protobuf_noise(uint8_t *buffer, size_t bufsize, size_t *msglen);
|
D | flakystream.h | 12 size_t position; 13 size_t msglen; 14 size_t fail_after; 17 void flakystream_init(flakystream_t *stream, const uint8_t *buffer, size_t msglen, size_t fail_afte…
|
D | random_data.c | 59 size_t rand_len(size_t max) in rand_len() 62 size_t s; in rand_len() 78 void rand_fill(uint8_t *buf, size_t count) in rand_fill() 87 size_t rand_fill_protobuf(uint8_t *buf, size_t min_bytes, size_t max_bytes, int min_tag) in rand_fill_protobuf() 119 size_t len; in rand_fill_protobuf() 139 void rand_mess(uint8_t *buf, size_t count) in rand_mess() 176 void rand_protobuf_noise(uint8_t *buffer, size_t bufsize, size_t *msglen) in rand_protobuf_noise() 179 size_t max_size = bufsize - 32 - *msglen; in rand_protobuf_noise() 184 size_t s = rand_fill_protobuf(tmp, rand_len(max_size), bufsize - *msglen, 1000); in rand_protobuf_noise() 193 … size_t s = rand_fill_protobuf(buffer + *msglen, rand_len(max_size), bufsize - *msglen, 1000); in rand_protobuf_noise()
|
D | fuzztest.c | 34 static size_t g_bufsize = FUZZTEST_BUFSIZE; 51 static uint32_t xor32_checksum(const void *data, size_t len) in xor32_checksum() 65 static bool do_decode(const uint8_t *buffer, size_t msglen, size_t structsize, const pb_msgdesc_t *… in do_decode() 69 size_t initial_alloc_count = get_alloc_count(); in do_decode() 112 static bool do_stream_decode(const uint8_t *buffer, size_t msglen, size_t fail_after, size_t struct… in do_stream_decode() 116 size_t initial_alloc_count = get_alloc_count(); in do_stream_decode() 160 bool do_callback_decode(const uint8_t *buffer, size_t msglen, bool assert_success) in do_callback_decode() 164 size_t initial_alloc_count = get_alloc_count(); in do_callback_decode() 198 void do_roundtrip(const uint8_t *buffer, size_t msglen, size_t structsize, const pb_msgdesc_t *msgt… in do_roundtrip() 202 size_t msglen2, msglen3; in do_roundtrip() [all …]
|
D | flakystream.c | 4 bool flakystream_callback(pb_istream_t *stream, pb_byte_t *buf, size_t count) in flakystream_callback() 23 void flakystream_init(flakystream_t *stream, const uint8_t *buffer, size_t msglen, size_t fail_afte… in flakystream_init()
|
D | validation.h | 9 void validate_message(const void *msg, size_t structsize, const pb_msgdesc_t *msgtype);
|
D | validation.c | 90 size_t allocated_size = get_allocation_size(iter->pData); in validate_pointer() 96 size_t allocated_size = get_allocation_size(iter->pData); in validate_pointer() 144 void validate_message(const void *msg, size_t structsize, const pb_msgdesc_t *msgtype) in validate_message()
|
/nanopb-2.7.6/extra/ |
D | pb_syshdr.h | 42 typedef uint32_t size_t; typedef 43 #define offsetof(st, m) ((size_t)(&((st *)0)->m)) 69 void *realloc(void *ptr, size_t size); 80 static size_t strlen( const char * s ) in strlen() 82 size_t rc = 0; in strlen() 90 static void * memcpy( void *s1, const void *s2, size_t n ) in memcpy() 101 static void * memset( void * s, int c, size_t n ) in memset()
|
/nanopb-2.7.6/ |
D | pb_encode.h | 38 bool (*callback)(pb_ostream_t *stream, const pb_byte_t *buf, size_t count); 41 size_t max_size; /* Limit number of output bytes written (or use SIZE_MAX). */ 42 size_t bytes_written; /* Number of bytes written so far. */ 91 bool pb_get_encoded_size(size_t *size, const pb_msgdesc_t *fields, const void *src_struct); 104 pb_ostream_t pb_ostream_from_buffer(pb_byte_t *buf, size_t bufsize); 124 bool pb_write(pb_ostream_t *stream, const pb_byte_t *buf, size_t count); 156 bool pb_encode_string(pb_ostream_t *stream, const pb_byte_t *buffer, size_t size);
|
D | pb_decode.h | 37 bool (*callback)(pb_istream_t *stream, pb_byte_t *buf, size_t count); 41 size_t bytes_left; 134 pb_istream_t pb_istream_from_buffer(const pb_byte_t *buf, size_t msglen); 139 bool pb_read(pb_istream_t *stream, pb_byte_t *buf, size_t count);
|
D | pb_decode.c | 24 static bool checkreturn buf_read(pb_istream_t *stream, pb_byte_t *buf, size_t count); 26 …eturn read_raw_value(pb_istream_t *stream, pb_wire_type_t wire_type, pb_byte_t *buf, size_t *size); 46 static bool checkreturn allocate_field(pb_istream_t *stream, void *pData, size_t data_size, size_t … 70 static bool checkreturn buf_read(pb_istream_t *stream, pb_byte_t *buf, size_t count) in buf_read() 72 size_t i; in buf_read() 85 bool checkreturn pb_read(pb_istream_t *stream, pb_byte_t *buf, size_t count) in pb_read() 142 pb_istream_t pb_istream_from_buffer(const pb_byte_t *buf, size_t msglen) in pb_istream_from_buffer() 280 if ((size_t)length != length) in pb_skip_string() 285 return pb_read(stream, NULL, (size_t)length); in pb_skip_string() 320 …return read_raw_value(pb_istream_t *stream, pb_wire_type_t wire_type, pb_byte_t *buf, size_t *size) in read_raw_value() [all …]
|
D | pb_encode.c | 23 static bool checkreturn buf_write(pb_ostream_t *stream, const pb_byte_t *buf, size_t count); 52 static bool checkreturn buf_write(pb_ostream_t *stream, const pb_byte_t *buf, size_t count) in buf_write() 54 size_t i; in buf_write() 64 pb_ostream_t pb_ostream_from_buffer(pb_byte_t *buf, size_t bufsize) in pb_ostream_from_buffer() 81 bool checkreturn pb_write(pb_ostream_t *stream, const pb_byte_t *buf, size_t count) in pb_write() 115 size_t i; in safe_read_bool() 130 size_t size; in encode_array() 151 size = 4 * (size_t)count; in encode_array() 155 size = 8 * (size_t)count; in encode_array() 554 bool pb_get_encoded_size(size_t *size, const pb_msgdesc_t *fields, const void *src_struct) in pb_get_encoded_size() [all …]
|
/nanopb-2.7.6/spm_headers/nanopb/ |
D | pb_encode.h | 38 bool (*callback)(pb_ostream_t *stream, const pb_byte_t *buf, size_t count); 41 size_t max_size; /* Limit number of output bytes written (or use SIZE_MAX). */ 42 size_t bytes_written; /* Number of bytes written so far. */ 91 bool pb_get_encoded_size(size_t *size, const pb_msgdesc_t *fields, const void *src_struct); 104 pb_ostream_t pb_ostream_from_buffer(pb_byte_t *buf, size_t bufsize); 124 bool pb_write(pb_ostream_t *stream, const pb_byte_t *buf, size_t count); 156 bool pb_encode_string(pb_ostream_t *stream, const pb_byte_t *buffer, size_t size);
|
D | pb_decode.h | 37 bool (*callback)(pb_istream_t *stream, pb_byte_t *buf, size_t count); 41 size_t bytes_left; 134 pb_istream_t pb_istream_from_buffer(const pb_byte_t *buf, size_t msglen); 139 bool pb_read(pb_istream_t *stream, pb_byte_t *buf, size_t count);
|
/nanopb-2.7.6/tests/io_errors/ |
D | io_errors.c | 14 size_t fail_after; 17 bool read_callback(pb_istream_t *stream, uint8_t *buf, size_t count) in read_callback() 31 bool write_callback(pb_ostream_t *stream, const uint8_t *buf, size_t count) in write_callback() 49 size_t msglen; in main() 61 size_t i; in main() 101 size_t i; in main()
|
/nanopb-2.7.6/tests/regression/GHSA-gcx3-7m76-287p/ |
D | test.c | 8 bool stream_callback(pb_istream_t *stream, uint8_t *buf, size_t count) in stream_callback() 11 size_t len = fread(buf, 1, count, file); in stream_callback()
|
/nanopb-2.7.6/examples/network_server/ |
D | common.c | 11 static bool write_callback(pb_ostream_t *stream, const uint8_t *buf, size_t count) in write_callback() 17 static bool read_callback(pb_istream_t *stream, uint8_t *buf, size_t count) in read_callback()
|
/nanopb-2.7.6/tests/basic_stream/ |
D | decode_stream.c | 58 bool callback(pb_istream_t *stream, uint8_t *buf, size_t count) in callback() 61 size_t len = fread(buf, 1, count, file); in callback()
|
D | encode_stream.c | 10 bool streamcallback(pb_ostream_t *stream, const uint8_t *buf, size_t count) in streamcallback()
|
/nanopb-2.7.6/tests/missing_fields/ |
D | missing_fields.c | 11 size_t size; in main()
|
/nanopb-2.7.6/examples/cmake_simple/ |
D | simple.c | 10 size_t message_length; in main()
|
/nanopb-2.7.6/examples/simple/ |
D | simple.c | 10 size_t message_length; in main()
|
/nanopb-2.7.6/examples/cmake_relpath/ |
D | simple.c | 10 size_t message_length; in main()
|