diff options
author | Tycho Andersen <tycho@docker.com> | 2017-06-26 10:10:29 -0600 |
---|---|---|
committer | William Pitcock <nenolod@dereferenced.org> | 2017-06-30 21:58:28 +0000 |
commit | 423d985345f88d243304e6b10190c4945cd4a2a9 (patch) | |
tree | 84f7ae38ffb960cf0d342f94c4f778b759be0eaf /main/audit/0002-auparse-remove-use-of-rawmemchr.patch | |
parent | d9a08c9eb9b5086206823954c5bfef5f12ec0a4b (diff) | |
download | aports-423d985345f88d243304e6b10190c4945cd4a2a9.tar.bz2 aports-423d985345f88d243304e6b10190c4945cd4a2a9.tar.xz |
testing/audit: promote to main
Signed-off-by: Tycho Andersen <tycho@docker.com>
Diffstat (limited to 'main/audit/0002-auparse-remove-use-of-rawmemchr.patch')
-rw-r--r-- | main/audit/0002-auparse-remove-use-of-rawmemchr.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/main/audit/0002-auparse-remove-use-of-rawmemchr.patch b/main/audit/0002-auparse-remove-use-of-rawmemchr.patch new file mode 100644 index 0000000000..891a87bbc3 --- /dev/null +++ b/main/audit/0002-auparse-remove-use-of-rawmemchr.patch @@ -0,0 +1,34 @@ +From 8f2a6788b78dd6b219545aacbd42e2f84df8c71a Mon Sep 17 00:00:00 2001 +From: Tycho Andersen <tycho@docker.com> +Date: Mon, 13 Mar 2017 16:17:10 -0700 +Subject: [PATCH 2/4] auparse: remove use of rawmemchr + +just iterate over the string instead, it's much simpler and doesn't use a +glibc extension. + +Signed-off-by: Tycho Andersen <tycho@docker.com> +--- + auparse/interpret.c | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git a/auparse/interpret.c b/auparse/interpret.c +index ea17c41..75b7679 100644 +--- a/auparse/interpret.c ++++ b/auparse/interpret.c +@@ -819,10 +819,9 @@ static const char *print_proctitle(const char *val) + // Proctitle has arguments separated by NUL bytes + // We need to write over the NUL bytes with a space + // so that we can see the arguments +- while ((ptr = rawmemchr(ptr, '\0'))) { +- if (ptr >= end) +- break; +- *ptr = ' '; ++ while (ptr < end) { ++ if (*ptr == '\0') ++ *ptr = ' '; + ptr++; + } + } +-- +2.13.1 + |