]> code.ossystems Code Review - openembedded-core.git/commitdiff
quota: upgrade 4.05 -> 4.06
authorAlexander Kanavin <alex.kanavin@gmail.com>
Fri, 4 Dec 2020 20:07:19 +0000 (21:07 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 9 Dec 2020 12:15:17 +0000 (12:15 +0000)
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-extended/quota/quota/0001-quota-Use-realloc-3-instead-of-reallocarray-3.patch [new file with mode: 0644]
meta/recipes-extended/quota/quota_4.06.bb [moved from meta/recipes-extended/quota/quota_4.05.bb with 89% similarity]

diff --git a/meta/recipes-extended/quota/quota/0001-quota-Use-realloc-3-instead-of-reallocarray-3.patch b/meta/recipes-extended/quota/quota/0001-quota-Use-realloc-3-instead-of-reallocarray-3.patch
new file mode 100644 (file)
index 0000000..34ded2d
--- /dev/null
@@ -0,0 +1,34 @@
+From 02b222a335527f1031cc9495d8c5ebc1bc5b1d4e Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Wed, 11 Nov 2020 15:00:47 +0100
+Subject: [PATCH] quota: Use realloc(3) instead of reallocarray(3)
+
+reallocarray(3) has been added to glibc relatively recently (version
+2.26, from 2017) and apparently not all users run new enough glibc. Just
+use realloc(3) for now since in this case there's no real risk of
+overflow.
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Signed-off-by: Jan Kara <jack@suse.cz>
+Upstream-Status: Backport
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ quota.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/quota.c b/quota.c
+index a6ed61f..a60de12 100644
+--- a/quota.c
++++ b/quota.c
+@@ -385,7 +385,7 @@ int main(int argc, char **argv)
+                         break;
+                 case 259:
+                         fscount++;
+-                        fsnames = reallocarray(fsnames, fscount, sizeof(char *));
++                        fsnames = realloc(fsnames, fscount * sizeof(char *));
+                         if (!fsnames)
+                               die(1, _("Not enough memory for filesystem names"));
+                         fsnames[fscount - 1] = optarg;
+-- 
+2.17.1
+
similarity index 89%
rename from meta/recipes-extended/quota/quota_4.05.bb
rename to meta/recipes-extended/quota/quota_4.06.bb
index c5da1e71ed0ab831fd59e2ff8173468e552e0cd2..19ccbd588a621b1d0d2fa44884e31ec761a13bd7 100644 (file)
@@ -8,9 +8,9 @@ LIC_FILES_CHKSUM = "file://rquota_server.c;beginline=1;endline=20;md5=fe7e0d7e11
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/project/linuxquota/quota-tools/${PV}/quota-${PV}.tar.gz \
            file://fcntl.patch \
+           file://0001-quota-Use-realloc-3-instead-of-reallocarray-3.patch \
           "
-SRC_URI[md5sum] = "1c1dbd2cd3d680ccac661239b067e147"
-SRC_URI[sha256sum] = "ef3b5b5d1014ed1344b46c1826145e20cbef8db967b522403c9a060761cf7ab9"
+SRC_URI[sha256sum] = "2f3e03039f378d4f0d97acdb49daf581dcaad64d2e1ddf129495fd579fbd268d"
 
 CVE_PRODUCT = "linux_diskquota"