aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-04-28Add METADATA to nanopb-c: BSD+Apache2+zlib+MIT=NOTICE am: e1a745d93b am: ↵android-s-preview-1Bob Badour
74741d77d4 am: 05a8588518 am: 1c7089bdbd Change-Id: I5f0ce9bd8e140a51aa160a56a576c0fccf682aa9
2020-04-28Add METADATA to nanopb-c: BSD+Apache2+zlib+MIT=NOTICE am: e1a745d93b am: ↵Bob Badour
74741d77d4 am: 05a8588518 Change-Id: I8bb327b433673240716c9a53b7c8f7bfb15711c2
2020-04-28Add METADATA to nanopb-c: BSD+Apache2+zlib+MIT=NOTICE am: e1a745d93b am: ↵Bob Badour
74741d77d4 Change-Id: Ic1739f89569dce800c3883da4dfd469947b7e95e
2020-04-28Add METADATA to nanopb-c: BSD+Apache2+zlib+MIT=NOTICE am: e1a745d93bandroid-r-beta-3android-r-beta-2Bob Badour
Change-Id: Ib4b647b60a73f9d85f9c327ef40b27153136614a
2020-04-28Add METADATA to nanopb-c: BSD+Apache2+zlib+MIT=NOTICEBob Badour
Bug: 68860345 Bug: 69058154 Bug: 151953481 Test: no code changes Change-Id: I1d97d7392e071c520ccef35b986895b959c8cf28
2020-03-26Merge pull request #504 from LedgerHQ/maintenance_0.3Petteri Aimonen
Regression test + fix for proto3 submessage improperly considered empty
2020-03-26Regression test + fix for proto3 submessage improperly considered emptyFranck
2020-02-02Avoid overflows in allocation for packed fields.Petteri Aimonen
This will only occur with unlimited length streams, so it's kind-of low impact. Such streams allow denial of service anyway.
2020-02-01Publishing nanopb-0.3.9.5Petteri Aimonen
2020-02-01Fix invalid free() after failed realloc() (GHSA-gcx3-7m76-287p)Petteri Aimonen
2019-12-31Add workaround for avr-libc realloc() bug (#475)Petteri Aimonen
2019-12-19Fix empty submessages getting encoded in proto3 mode (#395)Petteri Aimonen
Repeated callback fields were being treated as "always present", even if the callback pointer wasn't set.
2019-12-14Eh, removed wrong release on PyPI..Petteri Aimonen
2019-12-14Further fix attempt for #461Petteri Aimonen
2019-12-14Automatically rebuild nanopb_pb2.pyPetteri Aimonen
2019-12-14Revert "Generate python-protobuf files for PyPI package (#461)"Petteri Aimonen
This reverts commit 597c747e5365fd5599d8aa0e6bb8c9bb882a95ee.
2019-12-14Generate python-protobuf files for PyPI package (#461)Petteri Aimonen
2019-12-13Backported Python pip packaging rules.Joshua Salzedo
2019-10-16Avoid compiler warning in bool cast (#440)Petteri Aimonen
2019-10-13Publishing nanopb-0.3.9.4Petteri Aimonen
2019-10-13Update changelogPetteri Aimonen
2019-10-11Add test for PB_ENCODE_ARRAYS_UNPACKEDPavol Rusnak
2019-10-11Fix "unused variable" warning when using PB_ENCODE_ARRAYS_UNPACKEDPavol Rusnak
2019-10-02Fix undefined behavior with bool fields (#434)Petteri Aimonen
Previously nanopb didn't enforce that decoded bool fields had valid true/false values. This could lead to undefined behavior in user code. This has potential security implications when 1) message contains bool field (has_ fields are safe) and 2) user code uses ternary operator dependent on the field value, such as: int value = msg.my_bool ? 1234 : 0 and 3) the value returned from ternary operator affects a memory access, such as: data_array[value] = 9999
2019-10-02Make fuzztest detect invalid bool values (#434)Petteri Aimonen
2019-08-27.gitignore: don't ignore generator-bin files (#419)Petteri Aimonen
2019-08-27Don't call stream callback with count=0 (#421)Petteri Aimonen
This could happen with zero-length submessages and strings. While technically valid, it is an useless call and a rare corner case that can easily lead to bugs in the callback implementation.
2019-08-27network_server example: Detect count=0 in read_callback() (#421)Petteri Aimonen
Previously the example code would falsely detect EOF condition if called with count = 0.
2019-08-27Add scons package to travis rules, for build automationPetteri Aimonen
2019-08-27Introduce new compile time flag: PB_ENCODE_ARRAYS_UNPACKEDPavol Rusnak
Don't encode scalar arrays as packed. This is only to be used when the decoder on the receiving side cannot process packed scalar arrays. Such example is older protobuf.js.
2019-06-01Add migration note about enum min/maxPetteri Aimonen
2019-06-01🔀 use min/max enum value for min/maxNoah Pendleton
Unsorted enums in message specifications do not result in correct min/max values per the protobuf spec for cpp code: https://developers.google.com/protocol-buffers/docs/reference/cpp-generated#enum The google cpp compiler uses the min/max _value_ instead of the position of the enum entry in the message spec, so this patch updates nanopb to do the same. Example input: ```protobuf syntax = "proto3"; enum Language { UNKNOWN = 0; ENGLISH_EN_GB = 12; ENGLISH_EN_US = 1; FRENCH_FR_FR = 2; ITALIAN_IT_IT = 3; GERMAN_DE_DE = 4; SPANISH_ES_AR = 13; SPANISH_ES_ES = 5; SPANISH_ES_MX = 14; SWEDISH_SV_SE = 6; DUTCH_NL_NL = 7; KOREAN_KO_KR = 8; JAPANESE_JA_JP = 9; CHINESE_SIMPLIFIED_ZH_CN = 10; CHINESE_TRADITIONAL_ZH_TW = 11; } ``` This would previously result in: ```c #define _Language_MIN Language_UNKNOWN #define _Language_MAX Language_CHINESE_TRADITIONAL_ZH_TW #define _Language_ARRAYSIZE ((Language)(Language_CHINESE_TRADITIONAL_ZH_TW+1)) ``` After this patch, ```c #define _Language_MIN Language_UNKNOWN #define _Language_MAX Language_SPANISH_ES_MX #define _Language_ARRAYSIZE ((Language)(Language_SPANISH_ES_MX+1)) ``` Add a test `enum_minmax` to cover this case.
2019-04-05Add host support for nanopb am: d8d508fb38 am: b97cbd30e1r_aml_301500702android-mainline-12.0.0_r55android-mainline-11.0.0_r9android-mainline-11.0.0_r8android-mainline-11.0.0_r7android-mainline-11.0.0_r6android-mainline-11.0.0_r5android-mainline-11.0.0_r45android-mainline-11.0.0_r44android-mainline-11.0.0_r43android-mainline-11.0.0_r42android-mainline-11.0.0_r41android-mainline-11.0.0_r40android-mainline-11.0.0_r4android-mainline-11.0.0_r39android-mainline-11.0.0_r38android-mainline-11.0.0_r37android-mainline-11.0.0_r36android-mainline-11.0.0_r35android-mainline-11.0.0_r34android-mainline-11.0.0_r33android-mainline-11.0.0_r32android-mainline-11.0.0_r31android-mainline-11.0.0_r30android-mainline-11.0.0_r3android-mainline-11.0.0_r29android-mainline-11.0.0_r28android-mainline-11.0.0_r27android-mainline-11.0.0_r26android-mainline-11.0.0_r25android-mainline-11.0.0_r24android-mainline-11.0.0_r23android-mainline-11.0.0_r22android-mainline-11.0.0_r21android-mainline-11.0.0_r20android-mainline-11.0.0_r2android-mainline-11.0.0_r19android-mainline-11.0.0_r18android-mainline-11.0.0_r17android-mainline-11.0.0_r16android-mainline-11.0.0_r15android-mainline-11.0.0_r14android-mainline-11.0.0_r13android-mainline-11.0.0_r12android-mainline-11.0.0_r10android-mainline-11.0.0_r1android-11.0.0_r9android-11.0.0_r8android-11.0.0_r7android-11.0.0_r48android-11.0.0_r47android-11.0.0_r46android-11.0.0_r45android-11.0.0_r44android-11.0.0_r43android-11.0.0_r42android-11.0.0_r41android-11.0.0_r40android-11.0.0_r39android-11.0.0_r38android-11.0.0_r37android-11.0.0_r36android-11.0.0_r35android-11.0.0_r34android-11.0.0_r33android-11.0.0_r32android-11.0.0_r31android-11.0.0_r30android-11.0.0_r29android-11.0.0_r28android-11.0.0_r27android-11.0.0_r26android-11.0.0_r24android-11.0.0_r23android-11.0.0_r22android-11.0.0_r21android-11.0.0_r20android-11.0.0_r19android-11.0.0_r18android-11.0.0_r16android-11.0.0_r15android-11.0.0_r14android-11.0.0_r13android-11.0.0_r12android-11.0.0_r11android-11.0.0_r10android11-qpr3-s1-releaseandroid11-qpr3-releaseandroid11-qpr2-releaseandroid11-qpr1-s2-releaseandroid11-qpr1-s1-releaseandroid11-qpr1-releaseandroid11-qpr1-d-s1-releaseandroid11-qpr1-d-releaseandroid11-qpr1-c-releaseandroid11-mainline-tethering-releaseandroid11-mainline-sparse-2021-jan-releaseandroid11-mainline-sparse-2020-dec-releaseandroid11-mainline-releaseandroid11-mainline-permission-releaseandroid11-mainline-os-statsd-releaseandroid11-mainline-networkstack-releaseandroid11-mainline-media-swcodec-releaseandroid11-mainline-media-releaseandroid11-mainline-extservices-releaseandroid11-mainline-documentsui-releaseandroid11-mainline-conscrypt-releaseandroid11-mainline-cellbroadcast-releaseandroid11-mainline-captiveportallogin-releaseandroid11-devandroid11-d2-releaseandroid11-d1-s7-releaseandroid11-d1-s6-releaseandroid11-d1-s5-releaseandroid11-d1-s1-releaseandroid11-d1-releaseandroid11-d1-b-releaseHansong Zhang
am: 07c127e075 Change-Id: I248ee8847450b3145c0ac9b06237d89f61a90a2d
2019-04-05Add host support for nanopb am: d8d508fb38bender-v1-stableandroid-r-preview-4android-r-preview-3android-r-preview-2android-r-preview-1android-mainline-10.0.0_r8android-mainline-10.0.0_r6ndk-sysroot-r21android10-mainline-resolv-releaseandroid10-mainline-networking-releaseandroid-games-sdk-unity-releaseandroid-games-sdk-unity-devHansong Zhang
am: b97cbd30e1 Change-Id: I0404d46f7f784ecd131080a4c1e755ccadc285e7
2019-04-05Add host support for nanopbandroid-o-mr1-iot-release-1.0.14android-o-mr1-iot-release-1.0.13Hansong Zhang
am: d8d508fb38 Change-Id: Ic059ea63104522e35704990577930b11dc16e02f
2019-04-03Add host support for nanopbandroid-q-preview-6android-q-preview-5android-q-preview-4android-q-preview-2.5android-o-mr1-iot-release-1.0.12oreo-mr1-iot-releaseHansong Zhang
Test: compile Change-Id: I9d5cb0b1d63cd38717f4a8e15785058da84262a4
2019-03-08Publishing nanopb-0.3.9.3Petteri Aimonen
2019-03-07Fix generator error with mangle_names option (#380)Petteri Aimonen
2019-03-07Add testcase for #380Petteri Aimonen
2019-03-07Fix incorrect PB_STATIC_ASSERT for bytes inside oneof (#363)Petteri Aimonen
2019-03-07Add testcase for #363Petteri Aimonen
2019-03-07Generator: Allow comma separated options in plugin mode (#343)Petteri Aimonen
2019-02-20Add 32BIT and 16BIT nanopb library. am: 3f5b6d4262 am: aaae7fff6eandroid-mainline-10.0.0_r9android-mainline-10.0.0_r7android-mainline-10.0.0_r5android-mainline-10.0.0_r4android-mainline-10.0.0_r10android-10.0.0_r9android-10.0.0_r8android-10.0.0_r7android-10.0.0_r45android-10.0.0_r44android-10.0.0_r43android-10.0.0_r42android-10.0.0_r41android-10.0.0_r40android-10.0.0_r39android-10.0.0_r38android-10.0.0_r37android-10.0.0_r36android-10.0.0_r35android-10.0.0_r34android-10.0.0_r33android-10.0.0_r32android-10.0.0_r31android-10.0.0_r30android-10.0.0_r29android-10.0.0_r28android-10.0.0_r27android-10.0.0_r26android-10.0.0_r25android-10.0.0_r24android-10.0.0_r23android-10.0.0_r22android-10.0.0_r21android-10.0.0_r20android-10.0.0_r19android-10.0.0_r18android-10.0.0_r16android-10.0.0_r15android-10.0.0_r14android-10.0.0_r13android-10.0.0_r12android10-qpr3-s1-releaseandroid10-qpr3-releaseandroid10-qpr2-s4-releaseandroid10-qpr2-s3-releaseandroid10-qpr2-s2-releaseandroid10-qpr2-s1-releaseandroid10-qpr2-releaseandroid10-qpr1-releaseandroid10-qpr1-mainline-releaseandroid10-qpr1-d-releaseandroid10-qpr1-c-s1-releaseandroid10-qpr1-c-releaseandroid10-qpr1-b-s1-releaseandroid10-qpr1-b-releaseandroid10-mainline-media-releaseandroid10-devandroid10-d4-s1-releaseandroid10-d4-releaseandroid10-c2f2-s2-releaseandroid10-c2f2-s1-releaseandroid10-c2f2-releaseYu Shan
am: 1d0ca59852 Change-Id: I412488a20b4fcfa05f58528c2e38fff5a7e3a0c0
2019-02-20Add 32BIT and 16BIT nanopb library. am: 3f5b6d4262Yu Shan
am: aaae7fff6e Change-Id: I7e9b49665176548ce0c7d5e5c9f3c62ec37d5650
2019-02-20Add 32BIT and 16BIT nanopb library.Yu Shan
am: 3f5b6d4262 Change-Id: I2f79eba12ecf6e8d7ab7ed2d102bbe745c0b6c0c
2019-02-19Add 32BIT and 16BIT nanopb library.android-q-preview-1android-o-mr1-iot-release-1.0.10Yu Shan
Add 32BIT and 16BIT compile time flag for nanopb library to support 16BIT or 32BIT size, default is 8BIT. User need to use the corresponding library when define the PB_FIELD_* flag during compilation. Test: None Bug: 122292884 Change-Id: I1b3c572e54297d020776e7721d37b65526f1a0ff
2019-02-04Merge Android Games SDK into master. am: 4090366181 am: eeedc9b64bXin Li
am: e80a74a431 Change-Id: I120cf2f5451910c68e9ebfad9d86358c02b32098
2019-02-04Merge Android Games SDK into master. am: 4090366181Xin Li
am: eeedc9b64b Change-Id: I3355d9aa570683a1488f528752342ce4527c6190
2019-02-04Merge Android Games SDK into master.Xin Li
am: 4090366181 Change-Id: Ic5a149eb6e898140647c92aa446f5614cfbcb7d0
2019-02-04Merge Android Games SDK into master.Xin Li
Bug: 123068679 Change-Id: I7b75d9d7c8a8980bcceafc44580fb70ce4d31938