-
Notifications
You must be signed in to change notification settings - Fork 15.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
protoc sets extension range max to 2147483647 instead of 536870912 when message_set_wire_format = true #26
Comments
The problem may be one of the two:
I couldn't reproduce either of these. Can you double check? |
Here is the problem: message MessageMaxRange1 { Without message_set_wire_format everything's fine! This is a protoc bug!... or Java's :) your turn! Regards, |
Why do you use message_set_wire_format? It's not a feature we support in open-source protobuf. |
I don't! What I am saying that protoc output is erroneous; could possibly used for malicious purposes and such. I am not suggesting that it's a security breach, but it is a bug. |
It's not a bug. When message_set_wire_format is enabled, the extension range is supposed to be up to 2147483647. This is an internal only feature. It spreads too widely across the code base so we haven't been able remove it from open-source release. |
Scenario:
test1.proto:
message Message1 {
extensions 1 to max;
}
FileDescriptorProto proto = ProtoFileDescriptorSet.parseFrom(..."test1.proto"...).get(0);
proto.getMessageType(0).getExtensionRange().getEnd() == 2147483647 instead of 536870912
There is possibility that this is the Java ProtoFileDescriptorSet.parseFrom() bug, though.I didn't have time to check.
Cheers,
David
The text was updated successfully, but these errors were encountered: