summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzhuyaliang <[email protected]>2023-09-15 13:59:17 +0800
committerLuke from DC <[email protected]>2023-10-03 04:12:45 +0000
commitbdafd0c2db93e85ed0e7b19fd502e254e5b587ea (patch)
tree76a90c65def700fe9dbd0728c9cebcf0b5a834e5
parent505a7ffcb7b964a764de7ade7f7009176b967927 (diff)
downloadengrampa-bdafd0c2db93e85ed0e7b19fd502e254e5b587ea.tar.bz2
engrampa-bdafd0c2db93e85ed0e7b19fd502e254e5b587ea.tar.xz
Fix Segfault on opening .deb files after recent Debian Unstable updates
Fix https://github.com/mate-desktop/engrampa/issues/496
-rw-r--r--src/glib-utils.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/glib-utils.c b/src/glib-utils.c
index 2ac5670..08dcb5c 100644
--- a/src/glib-utils.c
+++ b/src/glib-utils.c
@@ -390,6 +390,10 @@ split_line (const char *line,
fields[i] = g_strndup (scan, field_end - scan);
scan = eat_spaces (field_end);
}
+ else if (scan != NULL && i == n_fields - 1)
+ {
+ fields[i] = g_strdup (scan);
+ }
}
return fields;