Accepting request 48770 from Kernel:kdump

Copy from Kernel:kdump/makedumpfile based on submit request 48770 from user ptesarik

OBS-URL: https://build.opensuse.org/request/show/48770
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/makedumpfile?expand=0&rev=36
This commit is contained in:
OBS User autobuild
2010-09-23 23:01:01 +00:00
committed by Git OBS Bridge
parent 16e1db0df8
commit 61658ae686
6 changed files with 26 additions and 45 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4ceff188bd7a0defe6159ac7ca7839584e84614c2e64b99b363b55b9667d4df6
size 57397

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4a6ee891256078d6a587cfe1a3f40404f87ec23790dc48d4fef6b5b7fab550e4
size 58324

View File

@@ -5,7 +5,7 @@
--- a/Makefile
+++ b/Makefile
@@ -4,10 +4,10 @@ VERSION=1.3.5
DATE=11 November 2009
DATE=25 June 2010
CC = gcc
-CFLAGS = -g -O2 -Wall -D_FILE_OFFSET_BITS=64 \

View File

@@ -1,37 +0,0 @@
From 7f02d0afa45d4c14f91cb4a0a0202dd80786e95a Mon Sep 17 00:00:00 2001
From: Bernhard Walle <bernhard@bwalle.de>
Date: Sun, 21 Feb 2010 10:26:16 +0100
Subject: [PATCH] Fix buffer overflow when writing dh->signature
Fix following compile warning when building with gcc 4.5 and with the
flags '-O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables
-fasynchronous-unwind-tables -g -O2 -Wall'.
In function 'strcpy',
inlined from 'write_kdump_header' at makedumpfile.c:5457:8: \
/usr/include/bits/string3.h:107:3: warning: call to \
__builtin___strcpy_chk will always overflow destination buffer
Solution: Don't copy the terminating zero byte.
Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
---
makedumpfile.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/makedumpfile.c b/makedumpfile.c
index 4fa6f50..855c718 100644
--- a/makedumpfile.c
+++ b/makedumpfile.c
@@ -5454,7 +5454,7 @@ write_kdump_header(void)
/*
* Write common header
*/
- strcpy(dh->signature, KDUMP_SIGNATURE);
+ strncpy(dh->signature, KDUMP_SIGNATURE, strlen(KDUMP_SIGNATURE));
dh->header_version = 3;
dh->block_size = info->page_size;
dh->sub_hdr_size = sizeof(kh) + info->size_vmcoreinfo;
--
1.6.4.2

View File

@@ -1,3 +1,23 @@
-------------------------------------------------------------------
Wed Sep 22 08:13:48 UTC 2010 - ptesarik@novell.com
- Update to 1.3.6
* Features
o Use TMPDIR environment variable for temporary files
o Add linux-2.6.32 - 2.6.34 support
* Bugfixes
o Fix buffer overflow when writing dh->signature
o handle !SPARSEMEM_EX properly
* Code Cleanup
o Fix 'struct kdump_sub_header' member in IMPLEMENTATION
o fix typo in IMPLEMENTATION
o add maintainers
o add TMPDIR description
o add .gitignore file
o makedumpfile: works on 2.6.32
o the initialization method is operated if it is possible
- makedumpfile-fix-buffer-overflow.diff: dropped (upstream).
-------------------------------------------------------------------
Sun Feb 28 11:02:33 UTC 2010 - jengelh@medozas.de

View File

@@ -1,5 +1,5 @@
#
# spec file for package makedumpfile (Version 1.3.5)
# spec file for package makedumpfile (Version 1.3.6)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -26,14 +26,13 @@ BuildRequires: libdw-devel
BuildRequires: libdw-devel libdw1 libelf-devel libelf0 libelf1
%endif
License: GPLv2+
Version: 1.3.5
Version: 1.3.6
Release: 1
Summary: Partial kernel dump
Group: System/Kernel
Url: https://sourceforge.net/projects/makedumpfile/
Source: %{name}-%{version}.tar.bz2
Patch0: %{name}-coptflags.diff
Patch1: %{name}-fix-buffer-overflow.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: %ix86 x86_64 ia64 ppc64
@@ -52,7 +51,6 @@ Authors:
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%build
make COPTFLAGS="$RPM_OPT_FLAGS"