From b094a811d3590b640b2d0e356a10e6a1226e7221c6333213a5d2c8c7d215bdc2 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 21 Nov 2008 14:53:24 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemtap?expand=0&rev=29 --- systemtap-parameter-bound-check.diff | 11 +++++++++++ systemtap.changes | 5 +++++ systemtap.spec | 6 +++++- 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 systemtap-parameter-bound-check.diff diff --git a/systemtap-parameter-bound-check.diff b/systemtap-parameter-bound-check.diff new file mode 100644 index 0000000..273f751 --- /dev/null +++ b/systemtap-parameter-bound-check.diff @@ -0,0 +1,11 @@ +--- translate.cxx-dist 2008-09-06 16:27:03.000000000 +0200 ++++ translate.cxx 2008-11-21 14:19:52.000000000 +0100 +@@ -4193,7 +4193,7 @@ c_unparser::visit_print_format (print_fo + /* The type of the %m argument is 'char*'. */ + if (components[i].type == print_format::conv_memory) + o->line() << ", (char*)(uintptr_t)" << tmp[arg_ix++].value(); +- else ++ else if (arg_ix < (int) tmp.size()) + o->line() << ", " << tmp[arg_ix++].value(); + } + diff --git a/systemtap.changes b/systemtap.changes index d0c2ad8..61f213c 100644 --- a/systemtap.changes +++ b/systemtap.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Nov 21 14:09:21 CET 2008 - tiwai@suse.de + +- Add the bound check of parameters to fix segfault (bnc#447551) + ------------------------------------------------------------------- Tue Nov 4 13:57:24 CET 2008 - tiwai@suse.de diff --git a/systemtap.spec b/systemtap.spec index cb79b90..c866705 100644 --- a/systemtap.spec +++ b/systemtap.spec @@ -25,7 +25,7 @@ BuildRequires: latex2html %define package_version 20080906 License: GPL v2 or later Version: 0.7.1 -Release: 24 +Release: 25 Summary: Instrumentation System Group: Development/Tools/Debuggers Url: http://sourceware.org/systemtap/ @@ -35,6 +35,7 @@ Source: ftp://sources.redhat.com/pub/systemtap/snapshots/systemtap-%{pac Patch: systemtap-docdir-fix.diff Patch1: systemtap-old-autoconf-fix.diff Patch2: stap-fix-dump_unwindsyms.patch +Patch3: systemtap-parameter-bound-check.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -59,6 +60,7 @@ Authors: %patch1 %endif %patch2 -p1 +%patch3 %build autoreconf -fi @@ -83,6 +85,8 @@ rm -rf ${RPM_BUILD_ROOT} %dir %attr(0755,root,root) /var/cache/systemtap %changelog +* Fri Nov 21 2008 tiwai@suse.de +- Add the bound check of parameters to fix segfault (bnc#447551) * Tue Nov 04 2008 tiwai@suse.de - Fix systemtap assertion with CONFIG_RELOCATABLE (bnc#440351) * Thu Sep 11 2008 tiwai@suse.de