aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2022-07-19 16:08:12 +0200
committerPřemysl Eric Janouch <p@janouch.name>2022-07-19 16:08:53 +0200
commita9a9d69a92927ed9dff50b39de8be57d7ad65fcd (patch)
treeffb73c4949b31e3117a8414fb70cac2bb8dec49d
parent26dead7ea4dab8c3cacf81d533444550891177ef (diff)
downloadfiv-a9a9d69a92927ed9dff50b39de8be57d7ad65fcd.tar.gz
fiv-a9a9d69a92927ed9dff50b39de8be57d7ad65fcd.tar.xz
fiv-a9a9d69a92927ed9dff50b39de8be57d7ad65fcd.zip
Add missing array sentinel value
-rw-r--r--fiv-io.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fiv-io.c b/fiv-io.c
index fbf7250..c190984 100644
--- a/fiv-io.c
+++ b/fiv-io.c
@@ -3244,7 +3244,8 @@ fiv_io_model_init(FivIoModel *self)
g_strfreev(types);
gsize n = g_strv_length(globs);
- self->supported_patterns = g_malloc0_n(n, sizeof *self->supported_patterns);
+ self->supported_patterns =
+ g_malloc0_n(n + 1, sizeof *self->supported_patterns);
while (n--)
self->supported_patterns[n] = g_pattern_spec_new(globs[n]);
g_strfreev(globs);