aboutsummaryrefslogtreecommitdiff
path: root/src/librc-misc.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-04-06 01:04:07 +0000
committerRoy Marples <roy@marples.name>2007-04-06 01:04:07 +0000
commit657be653400bdb9fc8ab13037e51ecfbc1af9d40 (patch)
tree8e876d2a345eb56dff9b7c732a082bc00720d020 /src/librc-misc.c
parent308042c87bd920d787265f1854bf1695bdbab8e4 (diff)
Misc fixes, plugged a memory leak in runscript.c and use va_copy to avoid nasty segfaults
Diffstat (limited to 'src/librc-misc.c')
-rw-r--r--src/librc-misc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/librc-misc.c b/src/librc-misc.c
index 69b717c8..75df0455 100644
--- a/src/librc-misc.c
+++ b/src/librc-misc.c
@@ -695,16 +695,16 @@ char **rc_config_env (char **env)
{
fclose (fp);
if (file_regex ("/proc/xen/capabilities", "control_d"))
- sprintf (sys, "XENU");
+ snprintf (sys, sizeof (sys), "XENU");
}
if (! sys)
- sprintf (sys, "XEN0");
+ snprintf (sys, sizeof (sys), "XEN0");
}
else if (file_regex ("/proc/cpuinfo", "UML"))
- sprintf (sys, "UML");
+ snprintf (sys, sizeof (sys), "UML");
else if (file_regex ("/proc/self/status",
"(s_context|VxID|envID):[[:space:]]*[1-9]"))
- sprintf(sys, "VPS");
+ snprintf (sys, sizeof (sys), "VPS");
#endif
/* Only add a NET_FS list if not defined */