From 6ee8a7a79c3dc52f98a689ad38f801a5c0578b00 Mon Sep 17 00:00:00 2001 From: Al Stone Date: Mon, 1 Jun 2015 14:41:40 -0600 Subject: [PATCH] Add patch to fix segfaults (trying to use null ptr). Closes BZ#1219341. Signed-off-by: Al Stone --- acpica-tools.spec | 5 ++++- segfault.patch | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 segfault.patch diff --git a/acpica-tools.spec b/acpica-tools.spec index f10e442..6168438 100644 --- a/acpica-tools.spec +++ b/acpica-tools.spec @@ -35,6 +35,7 @@ Patch8: f23-harden.patch Patch9: acuuid.patch Patch10: dev-mem.patch Patch11: arm-madt.patch +Patch12: segfault.patch BuildRequires: bison patchutils flex @@ -97,6 +98,7 @@ gzip -dc %{SOURCE1} | tar -x --strip-components=1 -f - %patch9 -p1 -b .acuuid %patch10 -p1 -b .dev-mem %patch11 -p1 -b .arm-madt +%patch12 -p1 -b .segfault cp -p %{SOURCE2} README.Fedora cp -p %{SOURCE3} iasl.1 @@ -201,12 +203,13 @@ fi %changelog -* Thu May 28 2015 Al Stone - 20150515-1 +* Mon Jun 1 2015 Al Stone - 20150515-1 - Update to latest upstream. Closes BZ#122166 - Refresh patches - Add patch from upstream for incorrect UUIDs for NFIT - Add patch from Linaro to remove use of /dev/mem (use /sys instead) - Add patch from upstream to correct ARM GIC entries in MADT +- Add patch to fix segfaults reported. Closes BZ#1219341. * Mon Apr 13 2015 Al Stone - 20150410-1 - Update to latest upstream. Closes BZ#1190383 diff --git a/segfault.patch b/segfault.patch new file mode 100644 index 0000000..751b6b7 --- /dev/null +++ b/segfault.patch @@ -0,0 +1,33 @@ +diff -Naur acpica-unix2-20150515.orig/source/components/disassembler/dmcstyle.c acpica-unix2-20150515/source/components/disassembler/dmcstyle.c +--- acpica-unix2-20150515.orig/source/components/disassembler/dmcstyle.c 2015-06-01 14:32:51.769218887 -0600 ++++ acpica-unix2-20150515/source/components/disassembler/dmcstyle.c 2015-06-01 14:37:38.973898839 -0600 +@@ -407,7 +407,7 @@ + { + AcpiDmPromoteTarget (Op, Target); + +- if (!Target->Common.OperatorSymbol) ++ if (Target && !Target->Common.OperatorSymbol) + { + Target->Common.OperatorSymbol = " = "; + } +@@ -425,7 +425,7 @@ + Target = Child1->Common.Next; + AcpiDmPromoteTarget (Op, Target); + +- if (!Target->Common.OperatorSymbol) ++ if (Target && !Target->Common.OperatorSymbol) + { + Target->Common.OperatorSymbol = " = "; + } +@@ -446,7 +446,10 @@ + /* Valid target, not a placeholder */ + + AcpiDmPromoteTarget (Op, Target); +- Target->Common.OperatorSymbol = " = ~"; ++ if (Target) ++ { ++ Target->Common.OperatorSymbol = " = ~"; ++ } + } + else + {