diff options
Diffstat (limited to 'common/stringop.c')
-rw-r--r-- | common/stringop.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/common/stringop.c b/common/stringop.c index 8af0d60f..709be684 100644 --- a/common/stringop.c +++ b/common/stringop.c @@ -258,6 +258,9 @@ int unescape_string(char *string) { } char *join_args(char **argv, int argc) { + if (!sway_assert(argc > 0, "argc should be positive")) { + return NULL; + } int len = 0, i; for (i = 0; i < argc; ++i) { len += strlen(argv[i]) + 1; |