From: Ben Pfaff Date: Fri, 10 Feb 2023 18:53:06 +0000 (-0800) Subject: spv: Fix crash reading a page_setup without headings. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d795170ac11ce55afc8448a445c0ea3d3b9f4b2b;p=pspp spv: Fix crash reading a page_setup without headings. The SPV driver can output such a page_setup. --- diff --git a/src/output/spv/spv.c b/src/output/spv/spv.c index 38abf9775c..eb4d1cd792 100644 --- a/src/output/spv/spv.c +++ b/src/output/spv/spv.c @@ -321,6 +321,9 @@ decode_page_paragraph (const struct spvsx_page_paragraph *page_paragraph, { memset (ph, 0, sizeof *ph); + if (!page_paragraph) + return; + const struct spvsx_page_paragraph_text *page_paragraph_text = page_paragraph->page_paragraph_text; if (!page_paragraph_text)