Detect invalid sizes when encoding bytes fields.

This commit is contained in:
Petteri Aimonen
2013-10-24 21:45:39 +03:00
parent 86d6983156
commit ed564186e1
3 changed files with 24 additions and 3 deletions

View File

@@ -12,6 +12,10 @@ message StringMessage {
required string data = 1 [(nanopb).max_size = 10];
}
message BytesMessage {
required bytes data = 1 [(nanopb).max_size = 16];
}
message CallbackArray {
// We cheat a bit and use this message for testing other types, too.
// Nanopb does not care about the actual defined data type for callback