summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
1515cfb)
The memset() filled also the extensions field, which was just
waiting for a crash to happen.
the decoding and checks the fields. */
bool check_alltypes(pb_istream_t *stream, int mode)
{
the decoding and checks the fields. */
bool check_alltypes(pb_istream_t *stream, int mode)
{
- AllTypes alltypes;
-
- /* Fill with garbage to better detect initialization errors */
- memset(&alltypes, 0xAA, sizeof(alltypes));
+ AllTypes alltypes = {0};
if (!pb_decode(stream, AllTypes_fields, &alltypes))
return false;
if (!pb_decode(stream, AllTypes_fields, &alltypes))
return false;