I've been building tools to generate generic protobuf data from json (yes, 
I'm aware I lose context, this is for testing)

I've found a message I can parse properly, but protoc --decode_raw can't:

 \n  \a   3   4   5   0   0   0   0

protoc 
1 {
  6 {
  }
  6: 0x30303030
}

to reproduce it:

echo -n $'\x0a' > binary.dat; echo -n $'\x07' >> binary.dat; echo -n 
$'3450000' >> binary.dat ; protoc --decode_raw < binary.dat

I'm able to parse this properly using protowire as:
1: "3450000"

also if I change the first character in the bytes to a '1' I get a valid 
output:

$ echo -n $'\x0a' > binary.dat; echo -n $'\x07' >> binary.dat; echo -n 
$'1450000' >> binary.dat ; protoc --decode_raw < binary.dat
1: "1450000"

$ protoc --version
libprotoc 3.15.8

I've worked really hard to keep the reproduction as simple as possible, I 
haven't dug into the code for decode_raw yet, that's my next step.. 

thanks
-Barry

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/2ccfbf93-6b0e-49d5-ae8e-3b3dc1b55218n%40googlegroups.com.

Reply via email to