summaryrefslogtreecommitdiff
path: root/hugin_syslog.c
diff options
context:
space:
mode:
authorJonas Suhr Christensen <jsc@umbraculum.org>2013-06-14 15:12:09 +0200
committerJonas Suhr Christensen <jsc@umbraculum.org>2013-06-14 15:12:09 +0200
commit8ab91e5c823cfe7205330cf730ebf38b7676f685 (patch)
tree445e776167ba85487ecbb1276f85aa7b83d49221 /hugin_syslog.c
parentbb7388b685ed043b4a3030da86f7f1e491414773 (diff)
Fixed error in getting execname when running as a service.
Diffstat (limited to 'hugin_syslog.c')
-rw-r--r--hugin_syslog.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hugin_syslog.c b/hugin_syslog.c
index 6803cc6..9c705ca 100644
--- a/hugin_syslog.c
+++ b/hugin_syslog.c
@@ -126,7 +126,7 @@ void hug_syslog_init(const char* host, int port)
strncpy(execname, bufptr+1, SYSLOG_LENOFEXECNAME-1);
}
else {
- strcpy(execname, "\0");
+ strncpy(execname, buf, SYSLOG_LENOFEXECNAME-1);
}
// printf("\tRunning as %s with pid %d\n", execname, pid);