binary-parser-generator will pass a null pointer to spvbin_parse_string()
or spvbin_parse_bestring() for a string that should be parsed but not
stored. In such a case, the implementation would dereference a null
pointer. This fixes the problem.
This is only a theoretical problem because the grammars PSPP uses now
always store the strings that they parse.
Found by cppcheck.
Reported by John Darrington.
uint32_t (*raw_to_native32) (uint32_t),
char **p)
{
- *p = NULL;
+ if (p)
+ *p = NULL;
uint32_t length;
if (input->size - input->ofs < sizeof length)