summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2014-08-04Update changelogPetteri Aimonen1-0/+13
2014-08-04Generate #defines for initializing message structures.Petteri Aimonen5-20/+84
Usage like: MyMessage foo = MyMessage_init_default; MyMessage_init_default will initialize to default values defined in .proto. MyMessage_init_zero will initialize to null/zero values. Same results as {} or {0}, but will avoid compiler warnings by initializing everything explicitly. Update issue 79 Status: FixedInGit
2014-07-20Add skip_message option to generator.Petteri Aimonen4-3/+17
Update issue 121 Status: FixedInGit
2014-07-20Add support for inverted patterns in test framework.Petteri Aimonen1-3/+14
2014-07-20Cleanup and comment the code of network_server example.Petteri Aimonen2-65/+118
Update issue 123 Status: FixedInGit
2014-07-20Do not automatically add a dot with generator -e option.Petteri Aimonen1-6/+6
Now -e option in generator is more versatile. Especially it avoids double-dot problem with some build systems. Given foobar.proto, we now get: -e .pb => foobar.pb.c (default) -e _pb => foobar_pb.c -e '' => foobar.c Note that if you have used -e option previously, you will have to prepend . to the argument to get the same filenames as before. Update issue 122 Status: FixedInGit
2014-07-20Give better messages about the .options file path.Petteri Aimonen1-1/+10
Update issue 124 Status: FixedInGit
2014-07-20Fix problem with .options file and extension fields.Petteri Aimonen6-2/+34
The options for an extension field were being looked up under wrong name (MessageName instead of MessageName.fieldname). Fixed the problem and added regression test. Created a new subfolder for regression test cases. Update issue 125 Status: FixedInGit
2014-06-02Add unit tests for allocate_field().Petteri Aimonen1-0/+23
2014-06-02Make clearer that size = 0 in allocate_field() is not allowed.Petteri Aimonen1-17/+12
Back in design phase the code used realloc() for freeing the memory also. However, this is not entirely portable, and therefore the finished implementation used free() separately. There were some remnants of the size = 0 code in the allocate_field() code, which made it somewhat confusing. This change makes it clearer that size = 0 is not allowed (and not used by nanopb).
2014-06-02Don't use SIZE_MAX macro, as it is not in C89.Petteri Aimonen1-1/+2
Update issue 120 Status: FixedInGit
2014-05-30Add PB_PACKED_STRUCT support for Keil MDK-ARM toolchainPetteri Aimonen1-2/+2
Patch from Jon Read. Update issue 119 Status: FixedInGit
2014-05-20Setting version to 0.2.9-devPetteri Aimonen2-2/+2
2014-05-20Update changelog for 0.2.8Petteri Aimonen1-0/+6
2014-05-20Publishing nanopb-0.2.8Petteri Aimonen2-2/+2
2014-05-17Fix bug in alltypes test case that made fuzzing difficult.Petteri Aimonen5-0/+7
2014-05-17Fix security issue with PB_ENABLE_MALLOC.Petteri Aimonen1-2/+22
The multiplication in allocate_field could potentially overflow, leading to allocating too little memory. This could subsequently allow an attacker to cause a write past the buffer, overwriting other memory contents. The attack is possible if untrusted message data is decoded using nanopb, and the message type includes a pointer-type string or bytes field, or a repeated numeric field. Submessage fields are not affected. This issue only affects systems that have been compiled with PB_ENABLE_MALLOC enabled. Only version nanopb-0.2.7 is affected, as prior versions do not include this functionality. Update issue 117 Status: FixedInGit
2014-04-26Docs update, remove malloc from limitations listPetteri Aimonen1-1/+0
2014-04-18Add option to not add timestamps to .pb.h and .pb.c preambles.Petteri Aimonen1-2/+10
Patch by rusnakp. Update issue 115 Status: FixedInGit
2014-04-15Fix typos in scons command line optionsPetteri Aimonen1-2/+2
2014-04-15Remove -O0 from tests CFLAGS so that optimized builds can be tested alsoPetteri Aimonen1-4/+4
2014-04-09Fix bug in missing_fields test casePetteri Aimonen1-2/+5
2014-04-09Use -fsanitize=undefined when running tests with clangPetteri Aimonen1-3/+13
2014-04-07Setting version to 0.2.8-devPetteri Aimonen2-2/+2
2014-04-07Publishing nanopb-0.2.7Petteri Aimonen2-2/+2
2014-04-07Update changelogPetteri Aimonen1-0/+8
2014-04-05Add rule for building coverage summary using lcov.Petteri Aimonen6-18/+49
Also modified a few tests to be more compatible with coverage information, so that they use the same pb_encode/decode.c instead of making a copy.
2014-04-05Fix unused parameter warning when building without errmsg.Petteri Aimonen1-1/+5
2014-04-05Add a convenience function pb_get_encoded_size()Petteri Aimonen3-0/+24
There is minimal size penalty from this, and it is probably much more intuitive to use than PB_OSTREAM_SIZING itself. This has been suggested before also, but I ended up refusing it back them. Reconsidering it now, I see that an intuitive API is much better than any amount of documentation explaining a non-intuitive API. Update issue 16 Status: FixedInGit
2014-04-05Add a 'found' field to pb_extension_t.Petteri Aimonen4-2/+8
Update issue 112 Status: FixedInGit
2014-04-02Add some missing 'static' specifiersPetteri Aimonen3-22/+16
Update issue 91 Status: FixedInGit
2014-04-02Fix splint warnings, add splint test casePetteri Aimonen4-11/+60
2014-04-01Fix compile error when default value given for extension field.Petteri Aimonen2-1/+3
Update issue 111 Status: FixedInGit
2014-03-18Add stdlib.h to pb_syshdr.h for dynamic allocationPetteri Aimonen2-0/+12
2014-03-17More configuration options for dynamic allocPetteri Aimonen2-3/+17
2014-03-16Documentation updatesPetteri Aimonen4-8/+63
2014-03-15Finish the alltypes_pointer testcase, use valgrind if available.Petteri Aimonen4-168/+90
2014-03-15Get rid of pb_bytes_ptr_t, just allocate pb_bytes_array_t dynamically.Petteri Aimonen7-77/+59
This makes the internal logic much simpler, and also keeps the datatypes more similar between STATIC/POINTER cases. It will still be a bit cumbersome to use because of variable length array member. Macros PB_BYTES_ARRAY_T(n) and PB_BYTES_ARRAY_T_ALLOCSIZE(n) have been added to make life a bit easier. This has the drawback that it is no longer as easy to use externally allocated byte array as input for bytes field in pointer mode. However, this is still easy to do using callbacks, so it shouldn't be a large issue.
2014-03-12Add pb_release() functionPetteri Aimonen5-38/+185
2014-03-10More fixes for dynamic allocationPetteri Aimonen3-66/+93
2014-02-25Bugfixes for dynamic allocationPetteri Aimonen1-13/+39
2014-02-24Beginnings of malloc support in pb_decodePetteri Aimonen4-6/+362
2014-02-15Setting version to 0.2.7-devPetteri Aimonen2-2/+2
2014-02-15Publishing nanopb-0.2.6Petteri Aimonen2-2/+2
2014-02-12Update changelogPetteri Aimonen1-0/+8
2014-02-12Move descriptor.proto to google/protobuf directory where it belongs.Petteri Aimonen5-5/+5
This fixes some interoperability problems when trying to compile nanopb.proto for e.g. the Google's C++ library. Update issue 104 Status: FixedInGit
2014-02-12Add test case for package names defined in .proto file.Petteri Aimonen1-0/+36
2014-02-12Improve status/error reporting in generator.Petteri Aimonen1-11/+19
Update issue 105 Status: FixedInGit
2014-02-10Add AllTypes decoding test with callbacks.Petteri Aimonen2-1/+427
Update issue 99 Status: FixedInGit
2014-02-09Add AllTypes encoding test for callbacks (issue #99)Petteri Aimonen3-0/+420
Still need to do the decoding side.