read_record() assumed that read_extension_record() never set its output
argument to NULL when it returned true, but this is possible in an error
case.
CVE-2017-10792.
See also https://bugzilla.redhat.com/show_bug.cgi?id=
1467005.
See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=866890.
See also https://security-tracker.debian.org/tracker/CVE-2017-10792.
Reported by team OWL337, with fuzzer collAFL.
18. I'm surprised that SPSS puts up with this. */
struct sfm_extension_record *ext;
bool ok = read_extension_record (r, subtype, &ext);
- if (ok)
+ if (ok && ext)
ll_push_tail (&r->var_attrs, &ext->ll);
return ok;
}