Home
last modified time | relevance | path

Searched refs:bytes_left (Results 1 – 20 of 20) sorted by relevance

/nanopb-3.4.0/tests/fuzztest/
Dflakystream.c10 stream->bytes_left = 0; in flakystream_callback()
27 stream->stream.bytes_left = SIZE_MAX; in flakystream_init()
Dfuzztest.c149 return pb_read(stream, NULL, stream->bytes_left); in field_callback()
/nanopb-3.4.0/tests/raw_decode/
Draw_decode.c40 stream->bytes_left = 0; in callback()
66 while (stream->bytes_left) in raw_decode()
151 if (substream.bytes_left == 0) in raw_decode()
161 (int)substream.bytes_left); in raw_decode()
/nanopb-3.4.0/
Dpb_decode.c103 if (stream->bytes_left < count) in pb_read()
114 if (stream->bytes_left < count) in pb_read()
115 stream->bytes_left = 0; in pb_read()
117 stream->bytes_left -= count; in pb_read()
126 if (stream->bytes_left == 0) in pb_readbyte()
137 stream->bytes_left--; in pb_readbyte()
159 stream.bytes_left = msglen; in pb_istream_from_buffer()
177 if (stream->bytes_left == 0) in pb_decode_varint32_eof()
368 if (substream->bytes_left < size) in pb_make_string_substream()
371 substream->bytes_left = (size_t)size; in pb_make_string_substream()
[all …]
Dpb_decode.h41 size_t bytes_left; member
/nanopb-3.4.0/tests/inline/
Dinline_unittests.c35 TEST(istream.bytes_left == 0); in main()
56 TEST(istream.bytes_left == 0); in main()
/nanopb-3.4.0/tests/regression/GHSA-gcx3-7m76-287p/
Dtest.c19 stream->bytes_left = 0; in stream_callback()
/nanopb-3.4.0/tests/callbacks/
Ddecode_callbacks.c15 if (stream->bytes_left > sizeof(buffer) - 1) in print_string()
18 if (!pb_read(stream, buffer, stream->bytes_left)) in print_string()
/nanopb-3.4.0/tests/fixed_count/
Dfixed_count_unittests.c35 TEST(istream.bytes_left == 0); in main()
84 TEST(istream.bytes_left == 0); in main()
134 TEST(istream.bytes_left == 0); in main()
171 TEST(istream.bytes_left == 0); in main()
/nanopb-3.4.0/examples/network_server/
Dcommon.c28 stream->bytes_left = 0; /* EOF */ in read_callback()
/nanopb-3.4.0/tests/oneof_callback/
Ddecode_oneof.c26 int strlen = istream->bytes_left; in SubMsg3_callback()
58 int strlen = stream->bytes_left; in print_string()
/nanopb-3.4.0/tests/io_errors/
Dio_errors.c65 stream.bytes_left = msglen; in main()
83 stream.bytes_left = msglen; in main()
/nanopb-3.4.0/tests/decode_unittests/
Ddecode_unittests.c54 TEST(stream.bytes_left == sizeof(buffer1) - 6) in main()
55 TEST(pb_read(&stream, buffer2 + 6, stream.bytes_left)) in main()
57 TEST(stream.bytes_left == 0) in main()
113 TEST((s = S("\x00""foobar"), pb_skip_varint(&s) && s.bytes_left == 6)) in main()
114 TEST((s = S("\xAC\x02""foobar"), pb_skip_varint(&s) && s.bytes_left == 6)) in main()
116 pb_skip_varint(&s) && s.bytes_left == 6)) in main()
123 TEST((s = S("\x00""foobar"), pb_skip_string(&s) && s.bytes_left == 6)) in main()
124 TEST((s = S("\x04""testfoobar"), pb_skip_string(&s) && s.bytes_left == 6)) in main()
/nanopb-3.4.0/tests/basic_stream/
Ddecode_stream.c69 stream->bytes_left = 0; in callback()
/nanopb-3.4.0/spm_headers/nanopb/
Dpb_decode.h41 size_t bytes_left; member
/nanopb-3.4.0/tests/alltypes_proto3_callback/
Ddecode_alltypes_callback.c83 size_t len = stream->bytes_left; in read_string()
184 size_t len = stream->bytes_left; in read_repeated_string()
/nanopb-3.4.0/docs/
Dconcepts.md59 3) `bytes_written` and `bytes_left` are updated by pb_write and
62 `bytes_left`, `bytes_written` and `max_size` have smaller values
114 getting EOF error when reading, set `bytes_left` to 0 and return
124 size_t bytes_left;
149 stream->bytes_left = 0;
307 parsed, and is available at `stream->bytes_left`.
318 while (stream->bytes_left)
575 4) Exceeding the max_size or bytes_left of a stream.
Dsecurity.md51 1. Nanopb will never read more than `bytes_left` bytes from
Dreference.md749 | returns | True on success, false if `stream->bytes_left` is less than `count` or if …
751 End of file is signalled by `stream->bytes_left` being zero after pb_read returns false.
870 You can therefore check the total length in `stream->bytes_left` and read the data using [pb_read](…
966 This is interpreted as a number of bytes, and the substream is set up so that its `bytes_left` is i…
/nanopb-3.4.0/tests/alltypes_callback/
Ddecode_alltypes_callback.c83 size_t len = stream->bytes_left; in read_string()
185 size_t len = stream->bytes_left; in read_repeated_string()