aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/attr/attr-2.4.44
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-support/attr/attr-2.4.44')
-rw-r--r--meta/recipes-support/attr/attr-2.4.44/double-free.patch18
-rw-r--r--meta/recipes-support/attr/attr-2.4.44/memory-leak-in-copy.patch50
-rw-r--r--meta/recipes-support/attr/attr-2.4.44/memory-leak2.patch18
-rw-r--r--meta/recipes-support/attr/attr-2.4.44/pull-in-string.h.patch21
-rw-r--r--meta/recipes-support/attr/attr-2.4.44/thinko-in-restore.patch19
5 files changed, 126 insertions, 0 deletions
diff --git a/meta/recipes-support/attr/attr-2.4.44/double-free.patch b/meta/recipes-support/attr/attr-2.4.44/double-free.patch
new file mode 100644
index 0000000000..6fc684f6c2
--- /dev/null
+++ b/meta/recipes-support/attr/attr-2.4.44/double-free.patch
@@ -0,0 +1,18 @@
+commit 5b28eb3b0e0430ce6af28edc9100ca23299d1218
+Author: Kamil Dudka <kdudka@redhat.com>
+Date: Thu Jun 3 15:29:54 2010 +0200
+
+ attr_parse_attr_conf: eliminate a double free
+
+diff --git a/libattr/attr_copy_action.c b/libattr/attr_copy_action.c
+index 030bbf5..2697328 100644
+--- a/libattr/attr_copy_action.c
++++ b/libattr/attr_copy_action.c
+@@ -81,6 +81,7 @@ repeat:
+ fclose(file);
+ file = NULL;
+ free(text);
++ text = NULL;
+ size_guess *= 2;
+ goto repeat;
+ }
diff --git a/meta/recipes-support/attr/attr-2.4.44/memory-leak-in-copy.patch b/meta/recipes-support/attr/attr-2.4.44/memory-leak-in-copy.patch
new file mode 100644
index 0000000000..966632d87e
--- /dev/null
+++ b/meta/recipes-support/attr/attr-2.4.44/memory-leak-in-copy.patch
@@ -0,0 +1,50 @@
+commit 972b42a67393f762936e74d3ce929914181f5f28
+Author: Brandon Philips <brandon@ifup.org>
+Date: Thu Dec 17 17:15:57 2009 -0800
+
+ libattr: fix memory leak in attr_copy_action()
+
+ stanse found that attr_copy_action returns before freeing the memory
+ allocated for text.
+
+ Move fopen() above the malloc so this is not a problem.
+
+ Fixes this bug:
+ https://bugzilla.novell.com/show_bug.cgi?id=564735
+
+ Signed-off-by: Brandon Philips <bphilips@suse.de>
+
+diff --git a/libattr/attr_copy_action.c b/libattr/attr_copy_action.c
+index 0d7aca5..dc94224 100644
+--- a/libattr/attr_copy_action.c
++++ b/libattr/attr_copy_action.c
+@@ -53,7 +53,7 @@ free_attr_actions(void)
+ static int
+ attr_parse_attr_conf(struct error_context *ctx)
+ {
+- char *text, *t;
++ char *text = NULL, *t;
+ size_t size_guess = 4096, len;
+ FILE *file;
+ char *pattern = NULL;
+@@ -64,15 +64,16 @@ attr_parse_attr_conf(struct error_context *ctx)
+ return 0;
+
+ repeat:
+- text = malloc(size_guess + 1);
+- if (!text)
+- goto fail;
+-
+ if ((file = fopen(ATTR_CONF, "r")) == NULL) {
+ if (errno == ENOENT)
+ return 0;
+ goto fail;
+ }
++
++ text = malloc(size_guess + 1);
++ if (!text)
++ goto fail;
++
+ len = fread(text, 1, size_guess, file);
+ if (ferror(file))
+ goto fail;
diff --git a/meta/recipes-support/attr/attr-2.4.44/memory-leak2.patch b/meta/recipes-support/attr/attr-2.4.44/memory-leak2.patch
new file mode 100644
index 0000000000..03395423da
--- /dev/null
+++ b/meta/recipes-support/attr/attr-2.4.44/memory-leak2.patch
@@ -0,0 +1,18 @@
+commit 42f50a130d144ffbc01738f15da9d4f1b57505bd
+Author: Kamil Dudka <kdudka@redhat.com>
+Date: Thu Jun 3 15:23:04 2010 +0200
+
+ attr_parse_attr_conf: eliminate a memory leak
+
+diff --git a/libattr/attr_copy_action.c b/libattr/attr_copy_action.c
+index dc94224..030bbf5 100644
+--- a/libattr/attr_copy_action.c
++++ b/libattr/attr_copy_action.c
+@@ -129,6 +129,7 @@ repeat:
+
+ t += strcspn(t, "\n");
+ }
++ free(text);
+ return 0;
+
+ parse_error:
diff --git a/meta/recipes-support/attr/attr-2.4.44/pull-in-string.h.patch b/meta/recipes-support/attr/attr-2.4.44/pull-in-string.h.patch
new file mode 100644
index 0000000000..ccbc236284
--- /dev/null
+++ b/meta/recipes-support/attr/attr-2.4.44/pull-in-string.h.patch
@@ -0,0 +1,21 @@
+commit 235cdd2af498d288f1af1142e7a23fbd16dff907
+Author: Mike Frysinger <vapier@gentoo.org>
+Date: Fri Jan 8 21:53:19 2010 -0500
+
+ quote: pull in string.h for strchr prototype
+
+ Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+ Signed-off-by: Brandon Philips <brandon@ifup.org>
+
+diff --git a/libmisc/quote.c b/libmisc/quote.c
+index f98c887..bf8f9eb 100644
+--- a/libmisc/quote.c
++++ b/libmisc/quote.c
+@@ -20,6 +20,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <ctype.h>
++#include <string.h>
+ #include "misc.h"
+
+ const char *quote(const char *str, const char *quote_chars)
diff --git a/meta/recipes-support/attr/attr-2.4.44/thinko-in-restore.patch b/meta/recipes-support/attr/attr-2.4.44/thinko-in-restore.patch
new file mode 100644
index 0000000000..a84de94ed0
--- /dev/null
+++ b/meta/recipes-support/attr/attr-2.4.44/thinko-in-restore.patch
@@ -0,0 +1,19 @@
+commit e8d568c696692eed5c92d5a35498e1c26e13d6b3
+Author: Kamil Dudka <kdudka@redhat.com>
+Date: Thu Jun 3 15:30:19 2010 +0200
+
+ setfattr.c: fix thinko in restore()
+
+diff --git a/setfattr/setfattr.c b/setfattr/setfattr.c
+index 491c25a..0a14cfa 100644
+--- a/setfattr/setfattr.c
++++ b/setfattr/setfattr.c
+@@ -120,7 +120,7 @@ int restore(const char *filename)
+ break;
+ line++;
+ if (strncmp(l, "# file: ", 8) != 0) {
+- if (filename) {
++ if (file != stdin) {
+ fprintf(stderr, _("%s: %s: No filename found "
+ "in line %d, aborting\n"),
+ progname, filename, backup_line);