From 4d5853ef53a5fc0a674145edd5b1b23360279adf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Klitzing?= Date: Fri, 18 May 2018 13:39:55 +0200 Subject: community/msitools: moved from testing --- community/msitools/fix-segfault.patch | 44 +++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 community/msitools/fix-segfault.patch (limited to 'community/msitools/fix-segfault.patch') diff --git a/community/msitools/fix-segfault.patch b/community/msitools/fix-segfault.patch new file mode 100644 index 0000000000..e2109ef2dd --- /dev/null +++ b/community/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); + } -- cgit v1.2.3