diff options
author | phintuka <phintuka> | 2008-11-13 10:50:10 +0000 |
---|---|---|
committer | phintuka <phintuka> | 2008-11-13 10:50:10 +0000 |
commit | 0653789d69df51291414dbc4ae65db30c2eb63d1 (patch) | |
tree | a38fe03c5d9aacc8ff8c9a4fb52c395a74c0d9c9 | |
parent | 6ae2e687d1a784091702ea6ae511de9150edeb7b (diff) | |
download | xineliboutput-0653789d69df51291414dbc4ae65db30c2eb63d1.tar.gz xineliboutput-0653789d69df51291414dbc4ae65db30c2eb63d1.tar.bz2 |
Eliminated strn0cpy
-rw-r--r-- | xine_frontend_lirc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xine_frontend_lirc.c b/xine_frontend_lirc.c index 21e7b090..84f752d6 100644 --- a/xine_frontend_lirc.c +++ b/xine_frontend_lirc.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: xine_frontend_lirc.c,v 1.15 2008-11-11 00:02:33 phintuka Exp $ + * $Id: xine_frontend_lirc.c,v 1.16 2008-11-13 10:50:10 phintuka Exp $ * */ /* @@ -81,7 +81,8 @@ static void lircd_connect(void) } addr.sun_family = AF_UNIX; - strn0cpy(addr.sun_path, (char*)lirc_device_name, sizeof(addr.sun_path)); + strncpy(addr.sun_path, (char*)lirc_device_name, sizeof(addr.sun_path)); + addr.sun_path[sizeof(addr.sun_path)-1] = 0; if ((fd_lirc = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) { LOGERR("lirc error: socket() < 0"); |