kmod: update to 19.

This commit is contained in:
Juan RP 2014-12-26 09:52:39 +01:00
parent b6fe202a27
commit 3ba48a752f
3 changed files with 22 additions and 39 deletions

View file

@ -1,32 +0,0 @@
remove non-portable usage of strndupa
usage of strndupa is neither C99 nor POSIX,
it's a glibc invention, and a dangerous one since
alloca() is used behind the scenes which does not
give any guarantuees that it won't overflow the
stack.
--- libkmod/libkmod-util.c 2013-08-26 16:03:22.239000003 +0000
+++ libkmod/libkmod-util.c 2013-08-26 16:07:26.684000003 +0000
@@ -28,6 +28,7 @@
#include <unistd.h>
#include <errno.h>
#include <string.h>
+#include <limits.h>
#include <ctype.h>
#include "libkmod.h"
@@ -323,8 +324,11 @@
int mkdir_p(const char *path, int len, mode_t mode)
{
char *start, *end;
-
- start = strndupa(path, len);
+ char buf[PATH_MAX+1];
+ snprintf(buf, sizeof buf, "%s", path);
+ assert(len < sizeof(buf));
+ buf[len] = 0;
+ start = buf;
end = start + len;
/*

View file

@ -0,0 +1,15 @@
diff --git a/libkmod/libkmod-util.c b/libkmod/libkmod-util.c
index df12433..142e767 100644
--- shared/util.c
+++ shared/util.c
@@ -334,7 +334,9 @@ int mkdir_p(const char *path, int len, mode_t mode)
{
char *start, *end;
- start = strndupa(path, len);
+ start = alloca(len+1);
+ strncpy(start, path, len);
+ start[len] = '\0';
end = start + len;
/*

View file

@ -1,22 +1,22 @@
# Template file for 'kmod'
pkgname=kmod
version=18
revision=4
version=19
revision=1
build_style=gnu-configure
configure_args="--with-zlib --with-xz"
hostmakedepends="pkg-config"
makedepends="zlib-devel liblzma-devel"
make_dirs="
/etc/depmod.d 0755 root root
/etc/modprobe.d 0755 root root
/usr/lib/depmod.d 0755 root root
/usr/lib/modprobe.d 0755 root root"
/etc/depmod.d 0755 root root
/etc/modprobe.d 0755 root root
/usr/lib/depmod.d 0755 root root
/usr/lib/modprobe.d 0755 root root"
short_desc="Linux kernel module handling"
maintainer="Juan RP <xtraeme@gmail.com>"
license="GPL-2"
homepage="http://git.profusion.mobi/cgit.cgi/kmod.git"
distfiles="${KERNEL_SITE}/utils/kernel/kmod/kmod-${version}.tar.xz"
checksum=e16e57272b54acb219c465b334715cfdddb5d97ff5d8948d4830ca1a372a868e
checksum=3e7fee6eeff5435848b2dcc852bc8959066478d687d232284d67300c071e7b14
post_install() {
vinstall ${FILESDIR}/depmod-search.conf 644 usr/lib/depmod.d search.conf