On Wed, May 15, 2013 at 12:02 PM, Oliver Jowett <oliver.jow...@gmail.com>wrote:

> On Wed, May 15, 2013 at 11:16 AM, <mailto.jo...@gmail.com> wrote:
>
>>
>>
> I think it is more of a bug in the protoc implementation that it fail's to
>> parse such a message.
>>
>
> Do you have some test code to share?
> (I got as far as eyeballing the C++ implementation and it looks OK at a
> first glance)
>

In fact after a bit more work I can't reproduce your problem at all. What
are you doing differently to what I'm doing here?

Oliver


oliver@shiny:~$ protoc --version
libprotoc 2.4.1

oliver@shiny:~$ cat varint.proto
message VarintOuter {
  required VarintInner inner = 1;
}

message VarintInner {
  required int64 value = 1;
}

# Normal encoding:
oliver@shiny:~$ hexdump -C varint.bin
00000000  0a 02 08 64                                       |...d|
00000004
oliver@shiny:~$ protoc varint.proto --decode=VarintOuter <varint.bin
inner {
  value: 100
}

# "overly long" encoding:
oliver@shiny:~$ hexdump -C varint-long.bin
00000000  0a 82 00 08 64                                    |....d|
00000005
oliver@shiny:~$ protoc varint.proto --decode=VarintOuter <varint-long.bin
inner {
  value: 100
}

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to