10 Commits
Author SHA1 Message Date
Thomas Van Lenten 3c8b0109b1 Use the fuzz options support to control encoding options. (#2049)
In looking at the code coverage on oss-fuzz, I realized the encoding
support never goes down paths related to options being not the default,
so go ahead and allow the existing options extraction to set those also,
so we're running everything possible to help look for bugs.

All but one of the options defaulted to "false", so since the fuzz
options parsing was ensuring the extra bits were zero, it is safe to
just add the option. The one that wasn't zero, we add a new "inverted"
bool so all saved cases remain valid.

This also gave us the change to control "partial" on binary decoding, so
wire that up also.

Lastly, while at it, increase the options logging so it is a little more
complete.
2026-05-05 10:16:24 -04:00
Thomas Van Lenten ac8da77c93 Run swift-format -p -r -i . 2024-09-09 14:39:36 -04:00
Thomas Van Lenten 22a71b76db Fix options needing multiple bytes, add tests. 2024-05-01 14:30:12 -04:00
Thomas Van Lenten 1bfc284be5 Add support for decoding options during fuzz testing.
In Binary, TextFormat, and JSON, a leading byte is not value, so leverage that
to indicate that the next byte should be used as bits for decoding options.
2024-04-30 16:27:13 -04:00
Thomas Van Lenten 37a0e0b967 Standardize proto namespaces.
Make the proto namespace used more consistent and ensure they are scoped to this
project more clearly.

Delete files that don't seem to be use/validating anything.
2023-07-24 14:49:30 -04:00
Gus Cairo 3caa2f6ac2 Undo changes to non-Core packages
Undo changes to FuzzTesting, Conformance and protoc-gen. These now use SwiftProtobuf (i.e. Core + FoundationCompat)
2022-11-11 17:07:55 +00:00
Gus Cairo bd742616b5 Use own protocol instead of Data/ContiguousBytes 2022-11-11 17:07:55 +00:00
Thomas Van Lenten a9faaefed7 Serialize after decoding/parsing.
Looking at the fuzz coverage
  https://storage.googleapis.com/oss-fuzz-coverage/swift-protobuf/reports/20210903/linux/report.html
One thing that sticks out is nothing testing serialization, so add serialization
when a message was parsed just to ensure things are safe there also.
2021-09-07 11:17:46 -04:00
Thomas Van Lenten 6feda7a004 Fixup names 2021-04-13 15:06:48 -04:00
Thomas Van Lenten 582c903886 Make a FuzzTesting directory with package file.
On macOS this requires using a swift.org toolchain since the swift support in
Xcode doesn't include fuzz support.

Add a second stage to the 'build' CI workflow to ensure these targets stay
building also.
2021-04-13 13:48:58 -04:00