diff options
author | phintuka <phintuka> | 2007-03-14 11:58:42 +0000 |
---|---|---|
committer | phintuka <phintuka> | 2007-03-14 11:58:42 +0000 |
commit | f22495c359182a08d37620cb3322749bb6e4a9f1 (patch) | |
tree | 1bd6dca8f6d26dd745b4dc484568f0029e7b1f6c | |
parent | 3d499cc39ffa22f5253a03a22ea28e51bf0f0d06 (diff) | |
download | xineliboutput-f22495c359182a08d37620cb3322749bb6e4a9f1.tar.gz xineliboutput-f22495c359182a08d37620cb3322749bb6e4a9f1.tar.bz2 |
Prevent socket name overflow
-rw-r--r-- | xine_frontend_lirc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xine_frontend_lirc.c b/xine_frontend_lirc.c index d8b9a8cf..63ca4bc2 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.6 2007-01-01 06:43:46 phintuka Exp $ + * $Id: xine_frontend_lirc.c,v 1.7 2007-03-14 11:58:42 phintuka Exp $ * */ /* @@ -20,7 +20,7 @@ * * LIRC support added by Carsten Koch <Carsten.Koch@icem.de> 2000-06-16. * - * $Id: xine_frontend_lirc.c,v 1.6 2007-01-01 06:43:46 phintuka Exp $ + * $Id: xine_frontend_lirc.c,v 1.7 2007-03-14 11:58:42 phintuka Exp $ */ @@ -72,7 +72,7 @@ static void lircd_connect(void) } addr.sun_family = AF_UNIX; - strcpy(addr.sun_path, (char*)lirc_device_name); + strn0cpy(addr.sun_path, (char*)lirc_device_name, sizeof(addr.sun_path)); if ((fd_lirc = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) { LOGERR("lirc error: socket() < 0"); |