diff options
Diffstat (limited to 'src/mountinfo.c')
-rw-r--r-- | src/mountinfo.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mountinfo.c b/src/mountinfo.c index ef3f636d..9121aa97 100644 --- a/src/mountinfo.c +++ b/src/mountinfo.c @@ -197,7 +197,9 @@ static char **find_mounts (struct args *args) options = xstrdup (o->o_name); else { char *tmp = NULL; - asprintf (&tmp, "%s,%s", options, o->o_name); + int l = strlen (options) + strlen (o->o_name) + 2; + tmp = xmalloc (sizeof (char) * l); + snprintf (tmp, l, "%s,%s", options, o->o_name); free (options); options = tmp; } |