aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-01-12Add input validation for 'parseRecursively' method.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-releaseHasini Gunasinghe
Bug: 192743373 Test: To be verified with fuzzer test case. Change-Id: If052fcb2b2bbc5e0bfc8cfccc51cef11b9914017
2021-06-30Check for integer overflow in cppbor::parseRecursively. am: 4907264bdcShawn Willden
Original change: https://googleplex-android-review.googlesource.com/c/platform/external/libcppbor/+/15110385 Change-Id: Ie9f88cfb2f561a44dd6afe7116eaced6dcef073b
2021-06-25Check for integer overflow in cppbor::parseRecursively.android-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-devShawn Willden
Bug: 191303307 Test: Fuzzer from bug Change-Id: I98830ec1bd77f152266f35a585d286be13a2551b
2021-04-21Merge "Remove CONTRIBUTING.md" am: 8f773c2103 am: 850761c661 am: ebb61a2708Treehugger Robot
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1670288 Change-Id: I501f267ae724235023bae64ea7936f1dcdf1e901
2021-04-21Merge "Remove CONTRIBUTING.md" am: 8f773c2103 am: 850761c661Treehugger Robot
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1670288 Change-Id: I187374c138a0124ffd5efac3ad3dd558136bab66
2021-04-21Merge "Remove CONTRIBUTING.md" am: 8f773c2103Treehugger Robot
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1670288 Change-Id: I3e6410ec4e3dfddf1c8d00241c175ad6307f39df
2021-04-21Merge "Remove CONTRIBUTING.md"android-s-beta-2android-s-beta-1Treehugger Robot
2021-04-15Fix integer cast in handleNint am: a7ca25a181 am: 33060560da am: 02e6c572b9Andrei Homescu
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1663840 Change-Id: I10b3f39467e855be7fcdf0be9a1006962a2580bf
2021-04-15Fix integer cast in handleNint am: a7ca25a181 am: 33060560daAndrei Homescu
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1663840 Change-Id: I393f03676542a63b9d0cb3d34b85ad5dc0b60e3d
2021-04-15Fix integer cast in handleNint am: a7ca25a181Andrei Homescu
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1663840 Change-Id: I8e27a73ec953c0db8a44fbff11c5dc81b26e11b0
2021-04-09Fix integer cast in handleNintAndrei Homescu
This fixes an incorrect integer cast in the handleNint function in cppbor_parse.cpp which would trigger UBSAN failures in the Trusty apploader. Change-Id: Id35865e524c9837d907fe352feac783b3f7f36b0
2021-04-09Make const overloads available in sub-classes. am: f3e77b2781 am: 05f22c3841 ↵Max Bires
am: 079f406f9f Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1670287 Change-Id: I63f44e5294f2a799d12a9aa2ee6120f6361864f6
2021-04-08Make const overloads available in sub-classes. am: f3e77b2781 am: 05f22c3841Max Bires
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1670287 Change-Id: I331cd866b2abb1b9cbe3021d40be5a798691c2d7
2021-04-08Make const overloads available in sub-classes. am: f3e77b2781Max Bires
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1670287 Change-Id: I817c04110708942a2977487603f852f949160529
2021-04-08Remove CONTRIBUTING.mdMax Bires
AOSP is the upstream source for this library. Test: Purple is a good color for a bike shed. Change-Id: I6be4c7ec47b15cc5fbed8091555613ef22623c28
2021-04-08Make const overloads available in sub-classes.Max Bires
Due to the overloading behavior in sub-classes, access to the methods returning const types in Item were not accessible from the Item subclasses. This change adds the using statements necessary to fix that. Test: cd hardware/interfaces/identity && mm -j48 Change-Id: I40bff6470c5fecfb308fec527540a8fbf1abf91a
2021-04-01Error on unknown simple value am: bdc577b46b am: 07613905aa am: 09e3750c14Andrew Scull
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1658065 Change-Id: Ifad4b06d9fa793eb17df193ec39497a1f9ccad30
2021-04-01Reject reserved values and indefinite lengths am: 42a7aa8fbf am: f816fae5dd ↵Andrew Scull
am: 57bba0cf18 Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1658064 Change-Id: I5433de3cbb5e69797f3f768c0a7436dbb66c0c79
2021-04-01Error on unknown simple value am: bdc577b46b am: 07613905aaAndrew Scull
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1658065 Change-Id: Ib0c56ae07f6d6958df227d8978f7eee1aa6a6cbf
2021-04-01Reject reserved values and indefinite lengths am: 42a7aa8fbf am: f816fae5ddAndrew Scull
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1658064 Change-Id: I4992142bb192776d9cacf5617084470b47c37ddd
2021-04-01Error on unknown simple value am: bdc577b46bAndrew Scull
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1658065 Change-Id: I382cf2f91896465db2fbdc67e7d6afb4ee51bf61
2021-04-01Reject reserved values and indefinite lengths am: 42a7aa8fbfAndrew Scull
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1658064 Change-Id: I643cd7fc1fa0f5e7430adabc73b7a2536d14bf0f
2021-03-30Error on unknown simple valueAndrew Scull
Null, true and false are handled but any other simple value, or floating pointer value, would otherwise reach the CHECK() that was expected to be unreachable. Instead, error when an unhandled value is seen. Test: cppbor_host_test_external Change-Id: Idb1099bbc51649e5eb8f5fb4fa60553e8cbe7e8f
2021-03-30Reject reserved values and indefinite lengthsAndrew Scull
RFC 8949 defines additional information values 28, 29, 30 and 31 as either reserved or indicating indefinite length values. Reject all of these. Test: cppbor_host_test_external Change-Id: Ic9ae7630c8f75d060e4199d375c1f696699a4f66
2021-03-25Add view items for zero-copy parsing of CBOR strings am: 4d171a791a am: ↵Andrei Homescu
decff6ea66 am: 7da24633c1 Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1588192 Change-Id: I95db2120fe0bc1c98b27a914bbe1193d6062d775
2021-03-25Add view items for zero-copy parsing of CBOR strings am: 4d171a791a am: ↵Andrei Homescu
decff6ea66 Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1588192 Change-Id: I86db18f07d7f04acc13f87d75006fc7558f8a544
2021-03-25Add view items for zero-copy parsing of CBOR strings am: 4d171a791aAndrei Homescu
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1588192 Change-Id: I97ebf04460b75af783b1759a8e5816bc198cf321
2021-03-11Add view items for zero-copy parsing of CBOR stringsAndrei Homescu
This CL adds two new ViewTstr and ViewBstr Item types that hold strings as string_view and basic_string_view<uint8_t> types instead of std::string or std::vector<uint8_t>, respectively. This allows for zero-copy parsing of CBOR (mainly strings), which is useful in low-memory environments like the apploader where CBOR data can contain large bstr values. Bug: 115420908 Test: cppbor_host_test_external Change-Id: I69322f0de258e3583cbd842ce240398504a1973f
2021-02-20[automerger skipped] Mark ab/7061308 as merged in stage. am: ad80fb83f5 -s ↵Xin Li
ours am: 2fd1541001 -s ours am skip reason: Change-Id Iaa423f28a08a8b8619ceff179b69b7d102a596ce with SHA-1 c285326084 is in history Original change: undetermined MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I19b81335d4263ca4d5ced139f51afd61c8327df5
2021-02-20[automerger skipped] Mark ab/7061308 as merged in stage. am: ad80fb83f5 -s oursXin Li
am skip reason: Change-Id Iaa423f28a08a8b8619ceff179b69b7d102a596ce with SHA-1 c285326084 is in history Original change: undetermined MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I8ea3da8ba7194bb4e8391b9542a1f3b02d094478
2021-02-20Mark ab/7061308 as merged in stage.Xin Li
Bug: 180401296 Merged-In: Iaa423f28a08a8b8619ceff179b69b7d102a596ce Change-Id: I6a852dd1175a92e556ba415cf48822ae6ab607eb
2021-02-17[LSC] Add LOCAL_LICENSE_KINDS to external/libcppbor am: 382930dc90 am: ↵Bob Badour
eb3be5a339 am: d9c666acbe Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1588871 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I57406a64386c65991f502bbcf44821e375b0c363
2021-02-17[LSC] Add LOCAL_LICENSE_KINDS to external/libcppbor am: 382930dc90 am: ↵Bob Badour
eb3be5a339 Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1588871 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I715eebf247da2adadd0e0055e08c042012bdafd9
2021-02-17[LSC] Add LOCAL_LICENSE_KINDS to external/libcppbor am: 382930dc90Bob Badour
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1588871 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I68b59e51881ce2565f9791ee5d9ce6ab845704fc
2021-02-12[LSC] Add LOCAL_LICENSE_KINDS to external/libcppborandroid-s-preview-1Bob Badour
Added SPDX-license-identifier-Apache-2.0 to: Android.bp Bug: 68860345 Bug: 151177513 Bug: 151953481 Test: m all Exempt-From-Owner-Approval: janitorial work Change-Id: Iaf70ec58fa73969cf9d7baeac57f56d745475e40
2020-12-16Change semantic tagging. am: 315d859ec4 am: 01589c6c88 am: c285326084Shawn Willden
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1515385 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I9d7b8d5850ea9d48126643d7e1a77344f859e6e1
2020-12-16Change semantic tagging. am: 315d859ec4 am: 01589c6c88Shawn Willden
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1515385 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Iaa423f28a08a8b8619ceff179b69b7d102a596ce
2020-12-16Change semantic tagging. am: 315d859ec4Shawn Willden
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1515385 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Ic98c01b5918eda13e21f0ff8d5343f98d5286914
2020-12-15Remove downcastItem<> am: f79067125c am: 7aa436b8ca am: b6b24c2ab8Shawn Willden
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1515384 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Ia6ef3af33c73065b3f82864e400b222d85cf26b8
2020-12-15Improve Map canonicalization and add Map iterators. am: 03990c2489 am: ↵Shawn Willden
be17dfffad am: cb173a1f06 Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1515383 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Ibd29b6884faa5bd1b7d77d272c51a27405975846
2020-12-14Remove downcastItem<> am: f79067125c am: 7aa436b8caShawn Willden
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1515384 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Icb8f251953eac9e5d58d9231e2c00fe76522abfa
2020-12-14Improve Map canonicalization and add Map iterators. am: 03990c2489 am: ↵Shawn Willden
be17dfffad Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1515383 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I92a8bb0aae2636ceacc214160d1a7b4079064a65
2020-12-14Remove downcastItem<> am: f79067125cShawn Willden
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1515384 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I1ed83527b3d731f12817e3a860e40f8b7be06251
2020-12-14Improve Map canonicalization and add Map iterators. am: 03990c2489Shawn Willden
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1515383 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Ic2e4d9e214c50a92d595d19e9c9a7aaddb213e91
2020-12-14Change semantic tagging.Shawn Willden
Semantic tagging in libcppbor was a bit cumbersome to use, with tags treated as separate items, requiring code that analyzes tagged data to pay attention to the tags. Among other issues, that violates the intention of semantic tagging in CBOR, which, per the RFC, does not require decoders to understand tags. This CL changes that behavior so that code that walks a parsed Item tree will not "see" the tags unless it looks for them, by calling "Item::semanticTagCount()" and then "Item::semanticTag()". Nested tags are supported. Test: cppbor_test_external Change-Id: Ifa99475fd0d9f369f3e379251979446a2ec262b5
2020-12-14Remove downcastItem<>Shawn Willden
This safe downcast template was never used and is hard to implement with the coming SemanticTag changes, so this CL removes it. Test: cppbor_test_external Change-Id: I0d4dd8b7323653c3924080f8fb328282dbca4566
2020-12-14Improve Map canonicalization and add Map iterators.Shawn Willden
This CL changes Map storage to use a vector of pairs, which removes the need to copy the contents twice to sort them and makes it easy to support Map iteration. Support for recursive canonicalization is added as well, and Map::get() uses a binary search when the map is canonicalized. Test: cppbor_test_external Change-Id: Ie7cee5d504e205e1768a26ec5df8436805a6eefe
2020-12-12Merge changes Id47afed4,I55b82067 am: 85e5286b59 am: 67e76405fa am: 5896c6726aTreehugger Robot
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1515382 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I1c5908d510c46780c312589b5bf0782c41b9ca63
2020-12-12Merge changes Id47afed4,I55b82067 am: 85e5286b59 am: 67e76405faTreehugger Robot
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1515382 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I8858e2a6fc149eb8dd9de15bef54264b08ecf5ca
2020-12-12Merge changes Id47afed4,I55b82067 am: 85e5286b59Treehugger Robot
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1515382 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Ic1ef63c321e42104feadca4751ac54b8d88abdb4