Fix bug in backwards_compatibility test case.
The memset() filled also the extensions field, which was just waiting for a crash to happen.
This commit is contained in:
@@ -22,10 +22,7 @@
|
|||||||
the decoding and checks the fields. */
|
the decoding and checks the fields. */
|
||||||
bool check_alltypes(pb_istream_t *stream, int mode)
|
bool check_alltypes(pb_istream_t *stream, int mode)
|
||||||
{
|
{
|
||||||
AllTypes alltypes;
|
AllTypes alltypes = {0};
|
||||||
|
|
||||||
/* Fill with garbage to better detect initialization errors */
|
|
||||||
memset(&alltypes, 0xAA, sizeof(alltypes));
|
|
||||||
|
|
||||||
if (!pb_decode(stream, AllTypes_fields, &alltypes))
|
if (!pb_decode(stream, AllTypes_fields, &alltypes))
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user