aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/usernetctl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/usernetctl.c b/src/usernetctl.c
index ece0544b..453bc741 100644
--- a/src/usernetctl.c
+++ b/src/usernetctl.c
@@ -135,8 +135,9 @@ int main(int argc, char ** argv) {
}
/* automatically prepend "ifcfg-" if it is not specified */
- if (!strncmp(ifaceConfig, "ifcfg-", 6)) {
+ if (strncmp(ifaceConfig, "ifcfg-", 6)) {
char *temp;
+
temp = (char *) alloca(strlen(ifaceConfig) + 7);
strcpy(temp, "ifcfg-");
/* strcat is safe because we got the length from strlen */