What steps will reproduce the problem?
1. Define a message with like:
message CipherKeys {
required bytes localKey = 1;
required uint32 localKeyChkSum = 2;
optional bytes groupKey = 3;
optional uint32 groupKeyChkSum = 4;
}
2. Look at the code generated for CipherKeys_write(). The code should be
checking for empty string. Code generate looks like:
/* Write the optional attribute only if it is different than the default value.
*/
if(_CipherKeys->_groupKey_len != 1
|| _CipherKeys->_groupKey[0] != '0') {
offset = write_raw_varint32((3<<3)+2, _buffer, offset);
offset = write_raw_varint32(_CipherKeys->_groupKey_len, _buffer, offset);
offset = write_raw_bytes(_CipherKeys->_groupKey, _CipherKeys->_groupKey_len, _buffer, offset);
}
The check for length should be _CipherKeys->_groupKey_len != 0 and the check
for a null string should be _CipherKeys->_groupKey[0] != '\0'
What version of the product are you using? On what operating system?
1.04M, host Windows XP, target IAR 5.51 MSP430
Original issue reported on code.google.com by alan.joh...@gd-ais.com on 20 Aug 2013 at 1:35
Original issue reported on code.google.com by
alan.joh...@gd-ais.com
on 20 Aug 2013 at 1:35