aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-04-13Jeff moved to a different team so remove him from OWNERS am: 31638f13a2 am: ↵t_frc_odp_330442040t_frc_odp_330442000t_frc_ase_330444010android13-frc-odp-releaseandroid13-devXin Li
d2d08a45ac am: bd24d4e500 Original change: https://android-review.googlesource.com/c/platform/external/nanopb-c/+/2062297 Change-Id: I3ea21353e1e07a032561e931073dfdc295b913bd Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-12Jeff moved to a different team so remove him from OWNERS am: 31638f13a2 am: ↵Xin Li
d2d08a45ac Original change: https://android-review.googlesource.com/c/platform/external/nanopb-c/+/2062297 Change-Id: I8131125fd674a831d897faebbea6129420ce7cde Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-12Jeff moved to a different team so remove him from OWNERS am: 31638f13a2Xin Li
Original change: https://android-review.googlesource.com/c/platform/external/nanopb-c/+/2062297 Change-Id: Ie99c0b53b014ace0ca0a546b62260c6b2570e8e2 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-12Jeff moved to a different team so remove him from OWNERSXin Li
Change-Id: I1fe5f91a295864e43212938a932e4852ccc0d18b
2022-03-10libprotobuf-c-nano: Updating min_sdk_version to 30ahujapalash
Ignore-AOSP-First: Updating it for apex which is on tm-dev Test: make a full build with m -j64 Bug: 220216883 Change-Id: I8a9d1cf630e9009e794e35b2b94732227ea66818
2021-12-21Adding library to bluetooth apexRoopa Sattiraju
Bug: 206121418 Test: Compile Change-Id: Iff797922920a0a2d92db4022b8ad93c078c2ef81
2021-12-13[automerger skipped] Upgrade nanopb to 0.3.9.8. am: 2698e8bf57 -s ours am: ↵Krzysztof Kosiński
e0506e99f1 -s ours am skip reason: Merged-In If02f28dcb5a6034625681a733e640c550e79c6a2 with SHA-1 b1208c1f81 is already in history Original change: https://googleplex-android-review.googlesource.com/c/platform/external/nanopb-c/+/16438090 Change-Id: I2d4fb1d35cc5aa8cc8c284f99fe4ef1a4501e753
2021-12-13[automerger skipped] Upgrade nanopb to 0.3.9.8. am: 2698e8bf57 -s oursKrzysztof Kosiński
am skip reason: Merged-In If02f28dcb5a6034625681a733e640c550e79c6a2 with SHA-1 b1208c1f81 is already in history Original change: https://googleplex-android-review.googlesource.com/c/platform/external/nanopb-c/+/16438090 Change-Id: I2fd31d44c04bbcebb814695ea3c09e48df112635
2021-12-10Upgrade nanopb to 0.3.9.8.android-12.1.0_r9android-12.1.0_r8android-12.1.0_r7android-12.1.0_r22android-12.1.0_r21android-12.1.0_r20android-12.1.0_r19android-12.1.0_r11android-12.1.0_r10android12L-devandroid12-qpr3-s7-releaseandroid12-qpr3-s6-releaseandroid12-qpr3-s5-releaseandroid12-qpr3-s4-releaseandroid12-qpr3-s3-releaseandroid12-qpr3-s2-releaseandroid12-qpr3-s1-releaseandroid12-qpr3-releaseKrzysztof Kosiński
Performed by merging the upgrade commit from master. Bug: 198577383 Test: presubmit Merged-In: If02f28dcb5a6034625681a733e640c550e79c6a2 Change-Id: I8f12a43d3a7c9048785de12c24285ae99e8571b6
2021-12-06Upgrade nanopb to 0.3.9.8. am: b1208c1f81 am: fffa37ba95 am: 7098b39799 am: ↵Krzysztof Kosiński
b89b3299cf Original change: https://android-review.googlesource.com/c/platform/external/nanopb-c/+/1911071 Change-Id: I0f437d2455800739eea53300b4b376eef8b16c93
2021-12-06Upgrade nanopb to 0.3.9.8. am: b1208c1f81 am: fffa37ba95 am: 7098b39799Krzysztof Kosiński
Original change: https://android-review.googlesource.com/c/platform/external/nanopb-c/+/1911071 Change-Id: I99eeef86c6f62e0587bb41f56a036c6d192bcc01
2021-12-06Upgrade nanopb to 0.3.9.8. am: b1208c1f81 am: fffa37ba95Krzysztof Kosiński
Original change: https://android-review.googlesource.com/c/platform/external/nanopb-c/+/1911071 Change-Id: I4b13c6cdbdafdc1f3b934ed998034e52003d66fb
2021-12-06Upgrade nanopb to 0.3.9.8. am: b1208c1f81android-t-preview-2android-t-preview-1android-t-beta-3android-s-v2-beta-3android-s-qpr3-beta-1android-t-preview-1android-s-v2-beta-3android-s-qpr3-beta-1Krzysztof Kosiński
Original change: https://android-review.googlesource.com/c/platform/external/nanopb-c/+/1911071 Change-Id: I302fb410274377eea0ede822422cfee2f0f779ee
2021-12-05Upgrade nanopb to 0.3.9.8.Krzysztof Kosiński
Bug: 204282739 Test: presubmit Change-Id: If02f28dcb5a6034625681a733e640c550e79c6a2
2021-10-28Upgrade nanopb to 0.3.9.2. am: 8eaf90c022 am: ce669ebda9 am: 31d9b7d242 am: ↵Krzysztof Kosiński
c41cd8542e am: 59d7c7b732 Original change: https://android-review.googlesource.com/c/platform/external/nanopb-c/+/1869256 Change-Id: I3a07b6c0be0529699aa4f550b64896384c0dd755
2021-10-28Upgrade nanopb to 0.3.9.2. am: 8eaf90c022 am: ce669ebda9 am: 31d9b7d242 am: ↵Krzysztof Kosiński
c41cd8542e Original change: https://android-review.googlesource.com/c/platform/external/nanopb-c/+/1869256 Change-Id: I360602b0123854585cd7857c949dbf2e25d07ee7
2021-10-28Upgrade nanopb to 0.3.9.2. am: 8eaf90c022 am: ce669ebda9 am: 31d9b7d242Krzysztof Kosiński
Original change: https://android-review.googlesource.com/c/platform/external/nanopb-c/+/1869256 Change-Id: I7da2cf793f1add66c452eef0a270643b4fbc50aa
2021-10-28Upgrade nanopb to 0.3.9.2. am: 8eaf90c022 am: ce669ebda9Krzysztof Kosiński
Original change: https://android-review.googlesource.com/c/platform/external/nanopb-c/+/1869256 Change-Id: I430696bc7ac3bfbe2c1f8977070d5941ff662f10
2021-10-28Upgrade nanopb to 0.3.9.2. am: 8eaf90c022Krzysztof Kosiński
Original change: https://android-review.googlesource.com/c/platform/external/nanopb-c/+/1869256 Change-Id: I4c6d2c7818657ea14f47c2f56059806ab7f4ac28
2021-10-27Upgrade nanopb to 0.3.9.2.Krzysztof Kosiński
Perfomed by merging version 0.3.9.2 from upstream. Retained local change defining PB_FIELD2 to PB_FIELD to preserve compatibility with autogenerated nanopb headers committed to Git in third party vendor code. Bug: 203713560 Test: build, presubmit Change-Id: Id4ea86c30c6a3d7e0217dfdfb3eef8c215aa2a62
2021-06-02Merge sc-mainline-prodXin Li
Bug: 189946434 Change-Id: I7b0e5190415072b38388950a87d2f8daa06b4932
2021-03-22Publishing nanopb-0.3.9.8Petteri Aimonen
2021-03-20Fix invalid free() with oneof (#647)Petteri Aimonen
Nanopb would call free() or realloc() on an invalid (attacker controlled) pointer value when all the following conditions are true: - PB_ENABLE_MALLOC is defined at the compile time - Message definition contains an oneof field, and the oneof contains at least one pointer type field and at least one non-pointer type field. - Data being decoded first contains a non-pointer value for the oneof field, and later contains an overwriting pointer value. Depending on message layout, the bug may not be exploitable in all cases, but it is known to be exploitable at least with string and bytes fields. Actual security impact will also depend on the heap implementation used.
2021-03-20Add testcase for #647: invalid free with oneofPetteri Aimonen
2021-02-19[LSC] Add LOCAL_LICENSE_KINDS to external/nanopb-c am: 9f40c4e3a0 am: ↵android-mainline-12.0.0_r99android-mainline-12.0.0_r98android-mainline-12.0.0_r77android-mainline-12.0.0_r70android-mainline-12.0.0_r69android-mainline-12.0.0_r63android-mainline-12.0.0_r59android-mainline-12.0.0_r56android-mainline-12.0.0_r5android-mainline-12.0.0_r49android-mainline-12.0.0_r42android-mainline-12.0.0_r39android-mainline-12.0.0_r22android-mainline-12.0.0_r19android-mainline-12.0.0_r122android-mainline-12.0.0_r115android-mainline-12.0.0_r113android-mainline-12.0.0_r100aml_tz3_311312010android12-mainline-networkstack-releaseandroid12-mainline-art-releaseBob Badour
53f48813a3 am: 31f6168234 am: 75930fdbca Original change: https://android-review.googlesource.com/c/platform/external/nanopb-c/+/1588798 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Ic7810e3a0fc949a1111b69ffa564b6f2ea3d4520
2021-02-19[LSC] Add LOCAL_LICENSE_KINDS to external/nanopb-c am: 9f40c4e3a0 am: ↵Bob Badour
53f48813a3 am: 31f6168234 am: 75930fdbca Original change: https://android-review.googlesource.com/c/platform/external/nanopb-c/+/1588798 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I5a343113a43d5a82a881350a715a84eb5247c4b0
2021-02-19[LSC] Add LOCAL_LICENSE_KINDS to external/nanopb-c am: 9f40c4e3a0 am: ↵android-s-v2-preview-2android-s-v2-preview-1android-s-v2-beta-2android-mainline-12.0.0_r4android-mainline-12.0.0_r36android-12.0.0_r32android-12.0.0_r29android-12.0.0_r28android-12.0.0_r27android-12.0.0_r26android-12.0.0_r21android-12.0.0_r20android-12.0.0_r19android-12.0.0_r18android-12.0.0_r16android12-qpr1-releaseandroid12-qpr1-d-s3-releaseandroid12-qpr1-d-s2-releaseandroid12-qpr1-d-s1-releaseandroid12-qpr1-d-releaseandroid12-devandroid12--mainline-releaseandroid-s-v2-preview-1Bob Badour
53f48813a3 am: 31f6168234 Original change: https://android-review.googlesource.com/c/platform/external/nanopb-c/+/1588798 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I969c2a119fde81fc67b58da48de2841e9cbd3e4e
2021-02-19[LSC] Add LOCAL_LICENSE_KINDS to external/nanopb-c am: 9f40c4e3a0 am: 53f48813a3Bob Badour
Original change: https://android-review.googlesource.com/c/platform/external/nanopb-c/+/1588798 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Idef8c3407a99e833bf582c6ce041d4c7cdb948e0
2021-02-19[LSC] Add LOCAL_LICENSE_KINDS to external/nanopb-c am: 9f40c4e3a0android-s-beta-5android-s-beta-4android-s-beta-3android-s-beta-2android-s-beta-1android-s-beta-5android-s-beta-4Bob Badour
Original change: https://android-review.googlesource.com/c/platform/external/nanopb-c/+/1588798 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Ic36113ce08baec380898d18885d3600a1938a7a7
2021-02-12[LSC] Add LOCAL_LICENSE_KINDS to external/nanopb-cBob Badour
Added SPDX-license-identifier-BSD SPDX-license-identifier-MIT to: generator/Android.bp Added SPDX-license-identifier-BSD SPDX-license-identifier-MIT SPDX-license-identifier-Zlib legacy_unencumbered to: Android.bp Bug: 68860345 Bug: 151177513 Bug: 151953481 Test: m all Exempt-From-Owner-Approval: janitorial work Change-Id: I5b0ab1087df58c93fa55e5cd735446c4e8583ffc
2021-02-03Expand alltypes test case for default values inside oneof (#635)Petteri Aimonen
The 0.3 branch was not affected by this bug, but expanding the test case to cover it.
2020-12-05Don't generate lines with trailing spaces (#622)Paul Beusterien
2020-12-03Backport "Verify stream size before allocating string / bytes." (#620)niooss-ledger
The 0.4 branch contains commit 2519119babea ("Verify stream size before allocating string / bytes."): This stops ridicuously large mallocs from getting through on length-limited streams or buffers. Typically you should also override realloc() to limit allocation size yourself if dealing with untrusted data in pointer mode, but this at least limits the potential denial-of-service attacks. Backport this patch in 0.3 maintenance branch in order to make fuzzing not crash as soon as the decoder tries to allocate a large buffer.
2020-11-25Publishing nanopb-0.3.9.7Petteri Aimonen
2020-11-25Update changelogPetteri Aimonen
2020-11-25Include version number in generator verbose outputPetteri Aimonen
2020-11-25Fix unsigned enums not working correctly inside OneOf (#611)Petteri Aimonen
Fixed also a few smaller issues where generator didn't consider fields inside oneof for field name mangling.
2020-11-25docs: fix simple typo, specifing -> specifying (#614)Tim Gates
There is a small typo in pb_encode.h, spm_headers/nanopb/pb_encode.h. Should read `specifying` rather than `specifing`.
2020-11-25Add '--version' option to nanopb_generator.py (#607)L
2020-11-25Fix memory leak with oneofs and PB_ENABLE_MALLOC (#615)Petteri Aimonen
Nanopb would leak memory when all of the following conditions were true: - PB_ENABLE_MALLOC is defined at the compile time - Message definitions contains an oneof field, the oneof contains a static submessage, and the static submessage contains a pointer field. - Data being decoded contains two values for the submessage. The logic in pb_release_union_field would detect that the same submessage occurs twice, and wouldn't release it because keeping the old values is necessary to match the C++ library behavior regarding message merges. But then decode_static_field() would go to memset() the whole submessage to zero, because it unconditionally assumed it to be uninitialized memory. This would normally happen when the contents of the union field is switched to a different oneof item, instead of merging with the same one. This commit changes it so that the field is memset() only when `which_field` contains a different tag.
2020-11-25Expand mem_release testcase to cover submessage merge (#615)Petteri Aimonen
This also covers the fairly rarely used behavior of protobuf C++ library regarding oneof merges: if an oneof submessage occurs multiple times in a message, their contents are merged together. This behavior was also previously broken in nanopb.
2020-09-13Fix iOS Build warning (#585)Paul Beusterien
2020-08-07More seamless SwiftPM implementation (#567)Paul Beusterien
This update allows clients to share common syntax for nanopb imports/includes between CocoaPods and Swift Package Manager. See example at firebase/firebase-ios-sdk#6165
2020-06-23Publishing nanopb-0.3.9.6Petteri Aimonen
2020-06-22Swift package manager (#549)Paul Beusterien
Add build rules for Swift package manager
2020-06-22Fix ImportError when using generator/protoc with Python 3Petteri Aimonen
2020-06-22Fix buffer overflow when encoding bytes with size set to 65535 (#547)Petteri Aimonen
On platforms where size_t equals pb_size_t, for example AVR where both are 16-bit, or x86 and ARM when PB_FIELD_32BIT is defined, the buffer size checks in pb_write() and pb_enc_submessage can overflow if a bytes field has size close to maximum size value. This causes read and write out of bounds. This issue can cause a security vulnerability if the size of a bytes field in the structure given to pb_encode() is untrusted. Note that pb_decode() has correct bounds checking and will reject too large values.
2020-04-29Add METADATA to nanopb-c: BSD+Apache2+zlib+MIT=NOTICE am: e1a745d93b am: ↵Bob Badour
74741d77d4 am: 05a8588518 am: 1c7089bdbd am: 08db7e3d44 Change-Id: Icf9e6e9209ed66815e3c5342801edf4d033dae17
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