forked from pool/rpmlint
Marcus Meissner
aba168ae61
- issue_68_BinariesCheck_lower_memory.patch: split into seperate patches issue_68_BinariesCheck_lower_memory-1.patch issue_68_BinariesCheck_lower_memory-2.patch issue_68_BinariesCheck_lower_memory-3.patch issue_68_BinariesCheck_lower_memory-4.patch and unfuzzed patch number 3. OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory:rpmlint/rpmlint?expand=0&rev=424
36 lines
1.6 KiB
Diff
36 lines
1.6 KiB
Diff
From f61aab52fdcbdc9096f2346ee4ecf9668d8a0fbc Mon Sep 17 00:00:00 2001
|
|
From: StefanBruens <stefan.bruens@rwth-aachen.de>
|
|
Date: Wed, 29 Jun 2016 18:28:55 +0200
|
|
Subject: [PATCH 2/3] Use default bufsize, move regex compile to common place
|
|
|
|
---
|
|
BinariesCheck.py | 7 +++----
|
|
1 file changed, 3 insertions(+), 4 deletions(-)
|
|
|
|
Index: rpmlint-rpmlint-1.8/BinariesCheck.py
|
|
===================================================================
|
|
--- rpmlint-rpmlint-1.8.orig/BinariesCheck.py
|
|
+++ rpmlint-rpmlint-1.8/BinariesCheck.py
|
|
@@ -64,6 +64,8 @@ class BinaryInfo:
|
|
setuid_call_regex = create_regexp_call(['setresuid', 'seteuid', 'setuid'])
|
|
setgroups_call_regex = create_regexp_call(['initgroups', 'setgroups'])
|
|
chroot_call_regex = create_regexp_call('chroot')
|
|
+ # 401eb8: e8 c3 f0 ff ff callq 400f80 <chdir@plt>
|
|
+ objdump_call_regex = re.compile(b'callq?\s(.*)')
|
|
|
|
forbidden_functions = Config.getOption("WarnOnFunction")
|
|
if forbidden_functions:
|
|
@@ -234,11 +236,8 @@ class BinaryInfo:
|
|
if self.chroot and self.chdir:
|
|
p = subprocess.Popen(
|
|
['env', 'LC_ALL=C', 'objdump', '-d', path],
|
|
- stdout=subprocess.PIPE, bufsize=1)
|
|
+ stdout=subprocess.PIPE, bufsize=-1)
|
|
with p.stdout:
|
|
- # we want that :
|
|
- # 401eb8: e8 c3 f0 ff ff callq 400f80 <chdir@plt>
|
|
- objdump_call_regex = re.compile(b'callq?\s(.*)')
|
|
index = 0
|
|
chroot_index = -99
|
|
chdir_index = -99
|