summaryrefslogtreecommitdiff
path: root/extra/quota-tools/nulls.diff
diff options
context:
space:
mode:
authorNicolas Reynolds <fauno@kiwwwi.com.ar>2011-07-25 11:33:12 -0300
committerNicolas Reynolds <fauno@kiwwwi.com.ar>2011-07-25 11:33:12 -0300
commit8b3071c77c79bbf0f373ca9b8ce0795c55d03669 (patch)
tree0b9c9ccac567cbaf87b22dcd32f10ceed2db065c /extra/quota-tools/nulls.diff
parent0d18015803bebeb58911bf791653597291056095 (diff)
parent43983783a3e8bf61896eb93a2858a14bbaf3a53b (diff)
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts: community/compiz-bcop/PKGBUILD community/compiz-fusion-plugins-extra/PKGBUILD community/compiz-fusion-plugins-main/PKGBUILD community/emerald/PKGBUILD community/gmic/PKGBUILD community/libcompizconfig/PKGBUILD core/xinetd/PKGBUILD extra/archboot/PKGBUILD extra/kdeplasma-addons/PKGBUILD extra/kipi-plugins/PKGBUILD extra/libmpdclient/PKGBUILD extra/live-media/PKGBUILD extra/mysql/PKGBUILD extra/pyopenssl/PKGBUILD extra/r/PKGBUILD extra/telepathy-mission-control/PKGBUILD libre/libretools/PKGBUILD multilib-testing/lib32-mesa/PKGBUILD multilib/lib32-libldap/PKGBUILD multilib/lib32-libldap/ntlm.patch multilib/wine/PKGBUILD testing/mesa/PKGBUILD
Diffstat (limited to 'extra/quota-tools/nulls.diff')
-rw-r--r--extra/quota-tools/nulls.diff20
1 files changed, 20 insertions, 0 deletions
diff --git a/extra/quota-tools/nulls.diff b/extra/quota-tools/nulls.diff
new file mode 100644
index 000000000..97c5bc482
--- /dev/null
+++ b/extra/quota-tools/nulls.diff
@@ -0,0 +1,20 @@
+#Description: Avoid memory corruption of NULL address
+#Author: Petr Pisar
+
+--- quota/quotasys.c 2010-02-18 09:44:11.000000000 +0100
++++ quota-tools/quotasys.c 2010-05-05 08:02:53.000000000 +0200
+@@ -746,9 +746,12 @@
+ kernel_qfmt_num = 0;
+ if (!stat("/proc/fs/xfs/stat", &st))
+ kernel_qfmt[kernel_qfmt_num++] = QF_XFS;
+- else
+- if (!quotactl(QCMD(Q_XGETQSTAT, 0), NULL, 0, NULL) || (errno != EINVAL && errno != ENOSYS))
++ else {
++ fs_quota_stat_t dummy;
++
++ if (!quotactl(QCMD(Q_XGETQSTAT, 0), "/dev/root", 0, (void *)&dummy) || (errno != EINVAL && errno != ENOSYS))
+ kernel_qfmt[kernel_qfmt_num++] = QF_XFS;
++ }
+ /* Detect new kernel interface; Assume generic interface unless we can prove there is not one... */
+ if (!stat("/proc/sys/fs/quota", &st) || errno != ENOENT) {
+ kernel_iface = IFACE_GENERIC;