diff --git a/lib/package_alternatives.c b/lib/package_alternatives.c index ee792471..38edb2bf 100644 --- a/lib/package_alternatives.c +++ b/lib/package_alternatives.c @@ -98,7 +98,7 @@ relpath(char *from, char *to) for (up = -1, from--; from && *from; from = strchr(from + 1, '/'), up++); - rel = calloc(1, 3 * up + strlen(p)); + rel = calloc(3 * up + strlen(p), 1); if (!rel) return NULL;