my rage from v8 is spilling over
Go to file
Thomas Van Lenten c18aa7795a Validate the tag numbers when parsing. (#1725)
There was a twist code path (that some times showed up due to what happened to
be in memory in failure cases), that would cast a bogus wire type into the
enum, and then fall through switch statements.

Resolve this by validating all wire types when parsing tags and throwing the
error at that point so it can't enter the system.

As added safety, stick in a few asserts for apis that get passed tags to ensure
they also are only seeing valid data.

Bonus: Tweak the parsing loop to skip some work when we get the end marker
(zero tag) instead of still looping through all the fields.
2016-06-29 09:51:13 -04:00
benchmarks Add the missing maintiner-clean entry for benchmarks 2016-05-06 12:47:41 -04:00
cmake Merge pull request #1666 from yeswalrus/cmake-prerelease-examples 2016-06-17 13:15:49 -07:00
conformance Added update_failure_list.py. 2016-06-03 09:39:38 -07:00
csharp Adding conditional compiler symbol to support .NET 3.5 (#1713) 2016-06-28 06:31:42 +01:00
docs Add https://github.com/os72/protobuf-dynamic 2016-05-31 22:07:14 -07:00
editors down-integrate internal changes 2015-05-21 19:32:02 -07:00
examples Use ExternalProject_Add to build the examples in a stand-alone fashion. 2016-06-06 12:06:55 -07:00
java Describe platform requirements for the compatibility tests. 2016-05-20 15:15:15 -07:00
javanano Update version numbers for other languages 2016-05-10 15:43:39 -07:00
jenkins Rearranged and commented files for running under Jenkins. 2016-03-04 14:34:30 -08:00
js JS package.json: Added author and updated Closure Library version. 2016-06-23 15:08:15 -07:00
m4 Merge pull request #789 from motahan/solaris64_fix 2016-01-20 16:57:01 -08:00
more_tests Add makefile for extended tests to be run before release. 2010-01-12 22:45:15 +00:00
objectivec Validate the tag numbers when parsing. (#1725) 2016-06-29 09:51:13 -04:00
php Down integrate from Google internal. 2016-04-28 14:34:59 -07:00
protoc-artifacts Merge pull request #1559 from google/beta-3 2016-05-18 11:44:56 -07:00
python Make surrogate regex even more lenient. 2016-06-06 17:14:58 -07:00
ruby Fixed oneof behavior for enums and fixed JRuby. 2016-05-18 15:39:29 -07:00
src Merge pull request #1696 from haberman/jswkt 2016-06-17 11:14:25 -07:00
util/python Remove hack for building Python support with Bazel. 2016-02-25 12:52:21 -08:00
.gitignore Expand the OS X/Xcode gitignores 2016-05-19 10:08:51 -04:00
.travis.yml Add the CocoaPods integration tests to Travis. 2016-06-14 14:26:01 -04:00
appveyor.bat Improved SHARED build from CMake project 2015-10-15 02:56:48 +03:00
appveyor.yml Down-integrate from internal code base. 2015-12-11 17:10:28 -08:00
autogen.sh Add support for arguments. 2015-10-13 09:42:20 -07:00
BUILD Bazel build: Keep generated sources and Python runtime in the same directory. 2016-05-25 18:02:09 -07:00
CHANGES.txt Update changes for lite 2016-05-16 11:20:33 -07:00
configure.ac Update the list of places where the version is stored. 2016-05-28 01:04:26 -07:00
CONTRIBUTORS.txt Add nano proto authors and update LICENSE file to include Android.mk. 2014-11-20 14:27:46 -08:00
generate_descriptor_proto.sh Merge branch 'master' of github.com:google/protobuf 2016-03-30 11:43:44 -07:00
gmock.BUILD Fix headers for gmock.BUILD 2015-12-01 22:52:42 +01:00
LICENSE Add support for POWER Linux 2015-11-03 14:49:42 -08:00
Makefile.am Add js/binary/encoder.js to js_EXTRA_DIST. 2016-05-22 21:44:16 -07:00
post_process_dist.sh Add js to post_process_dist.sh. 2015-12-28 16:31:10 -08:00
protobuf-lite.pc.in Uncomment conflict fields from pkg-config files. 2015-05-12 17:50:05 +02:00
protobuf.bzl Bazel build: Keep generated sources and Python runtime in the same directory. 2016-05-25 18:02:09 -07:00
protobuf.pc.in Uncomment conflict fields from pkg-config files. 2015-05-12 17:50:05 +02:00
Protobuf.podspec Merge pull request #1630 from google/beta-3 2016-05-31 13:00:31 -04:00
README.md Fix typos in README.md 2016-01-25 21:41:31 +01:00
six.BUILD Add srcs_version = "PY2AND3" in BUILD files 2015-12-03 13:16:06 -08:00
tests.sh Add the CocoaPods integration tests to Travis. 2016-06-14 14:26:01 -04:00
update_file_lists.sh Fix bugs on windows 2015-08-25 17:58:48 -07:00
WORKSPACE add java/util support based on java/util/pom.xml 2016-03-11 18:08:09 -08:00

Protocol Buffers - Google's data interchange format

Build Status Build status

Copyright 2008 Google Inc.

https://developers.google.com/protocol-buffers/

Overview

Protocol Buffers (a.k.a., protobuf) are Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data. You can find protobuf's documentation on the Google Developers site.

This README file contains protobuf installation instructions. To install protobuf, you need to install the protocol compiler (used to compile .proto files) and the protobuf runtime for your chosen programming language.

Protocol Compiler Installation

The protocol compiler is written in C++. If you are using C++, please follow the C++ Installation Instructions to install protoc along with the C++ runtime.

For non-C++ users, the simplest way to install the protocol compiler is to download a pre-built binary from our release page:

https://github.com/google/protobuf/releases

In the downloads section of each release, you can find pre-built binaries in zip packages: protoc-$VERSION-$PLATFORM.zip. It contains the protoc binary as well as a set of standard .proto files distributed along with protobuf.

If you are looking for an old version that is not available in the release page, check out the maven repo here:

http://repo1.maven.org/maven2/com/google/protobuf/protoc/

These pre-built binaries are only provided for released versions. If you want to use the github master version at HEAD, or you need to modify protobuf code, or you are using C++, it's recommended to build your own protoc binary from source.

If you would like to build protoc binary from source, see the C++ Installation Instructions.

Protobuf Runtime Installation

Protobuf supports several different programming languages. For each programming language, you can find instructions in the corresponding source directory about how to install protobuf runtime for that specific language:

Language Source
C++ (include C++ runtime and protoc) src
Java java
Python python
Objective-C objectivec
C# csharp
JavaNano javanano
JavaScript js
Ruby ruby
Go golang/protobuf
PHP TBD

Usage

The complete documentation for Protocol Buffers is available via the web at:

https://developers.google.com/protocol-buffers/