diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2017-10-04 15:20:28 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2017-10-04 15:36:29 +0000 |
commit | 99c12b5b179a21e76a9b3902d41ccb67c8f049dd (patch) | |
tree | b3cc0b5ea3d95430889a100c82ef0392159a7d6c /testing/msitools | |
parent | 533e452226f25d190a31b83c35fc3d6a7c557b13 (diff) | |
download | aports-99c12b5b179a21e76a9b3902d41ccb67c8f049dd.tar.bz2 aports-99c12b5b179a21e76a9b3902d41ccb67c8f049dd.tar.xz |
testing/msitools: fix segfault
the testcase failed on x86 and armhf due to a buffer overflow.
reported upstream:
https://bugzilla.gnome.org/show_bug.cgi?id=788495
Diffstat (limited to 'testing/msitools')
-rw-r--r-- | testing/msitools/APKBUILD | 8 | ||||
-rw-r--r-- | testing/msitools/fix-segfault.patch | 44 |
2 files changed, 49 insertions, 3 deletions
diff --git a/testing/msitools/APKBUILD b/testing/msitools/APKBUILD index fed6a16ef5..e6c2c7c69e 100644 --- a/testing/msitools/APKBUILD +++ b/testing/msitools/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: André Klitzing <aklitzing@gmail.com> pkgname=msitools pkgver=0.97 -pkgrel=0 +pkgrel=1 pkgdesc="Set of programs to inspect and build Windows Installer (.MSI) files" url="https://wiki.gnome.org/msitools" arch="all" @@ -9,7 +9,8 @@ license="GPL" makedepends="libgsf-dev libgcab-dev vala intltool libtool" subpackages="$pkgname-dev $pkgname-lang $pkgname-bash-completion:bashcomp:noarch" -source="http://ftp.gnome.org/pub/GNOME/sources/msitools/${pkgver}/${pkgname}-${pkgver}.tar.xz" +source="http://ftp.gnome.org/pub/GNOME/sources/msitools/${pkgver}/${pkgname}-${pkgver}.tar.xz + fix-segfault.patch" builddir="$srcdir/"$pkgname-$pkgver build() { @@ -43,4 +44,5 @@ _submv() { mv "$pkgdir"/$path "$subpkgdir"/${path%/*}/ } -sha512sums="bc4cefa7dacc69d10d8a29a0779966c70be97cbeb3a7651cc4292759f56ed2766345596df85a195f54fb4007221f4433ad9f32ed9b39e5b765a565a88ed399dc msitools-0.97.tar.xz" +sha512sums="bc4cefa7dacc69d10d8a29a0779966c70be97cbeb3a7651cc4292759f56ed2766345596df85a195f54fb4007221f4433ad9f32ed9b39e5b765a565a88ed399dc msitools-0.97.tar.xz +71311d61517997ac7017611326e81e2ec1d5ebdd87179096973299c04f89d2207a046e2437d6e310ee17325d7f527790519e98672f9256ba0574fc8f3a4e87ce fix-segfault.patch" diff --git a/testing/msitools/fix-segfault.patch b/testing/msitools/fix-segfault.patch new file mode 100644 index 0000000000..e2109ef2dd --- /dev/null +++ b/testing/msitools/fix-segfault.patch @@ -0,0 +1,44 @@ +diff --git a/tools/msiinfo.c b/tools/msiinfo.c +index ac299fd..e695f14 100644 +--- a/tools/msiinfo.c ++++ b/tools/msiinfo.c +@@ -420,7 +420,7 @@ static gboolean export_create_table(const char *table, + guint num_columns = libmsi_record_get_field_count(names); + guint num_keys = libmsi_record_get_field_count(keys); + guint i, len; +- char size[20], extra[30]; ++ char size[20], extra[30], typestr[20]; + gchar *name, *type; + + if (!strcmp(table, "_Tables") || +@@ -455,25 +455,25 @@ static gboolean export_create_table(const char *table, + /* fall through */ + case 's': case 'S': + strcpy(size, type+1); +- sprintf(type, "CHAR(%s)", size); ++ sprintf(typestr, "CHAR(%s)", size); + break; + case 'i': case 'I': + len = atol(type + 1); + if (len <= 2) +- strcpy(type, "INT"); ++ strcpy(typestr, "INT"); + else if (len == 4) +- strcpy(type, "LONG"); ++ strcpy(typestr, "LONG"); + else + abort(); + break; + case 'v': case 'V': +- strcpy(type, "OBJECT"); ++ strcpy(typestr, "OBJECT"); + break; + default: + abort(); + } + +- printf("`%s` %s%s", name, type, extra); ++ printf("`%s` %s%s", name, typestr, extra); + g_free(name); + g_free(type); + } |