diff --git a/ChangeLog b/ChangeLog index 1e8b6d70..aafae0db 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21792,3 +21792,5 @@ * Cleaned up compile warnings in 'lib/rdttydevice.cpp'. 2021-06-01 Fred Gleason * Cleaned up compile warnings in 'lib/rdupload.cpp'. +2021-06-01 Fred Gleason + * Cleaned up compile warnings in 'lib/rdunixsocket.cpp'. diff --git a/lib/rdunixsocket.cpp b/lib/rdunixsocket.cpp index 5972c339..df8dfeb1 100644 --- a/lib/rdunixsocket.cpp +++ b/lib/rdunixsocket.cpp @@ -2,7 +2,7 @@ // // UNIX Socket // -// (C) Copyright 2018 Fred Gleason +// (C) Copyright 2018-2021 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as @@ -48,7 +48,7 @@ bool RDUnixSocket::connectToAbstract(const QString &addr, } memset(&sa,0,sizeof(sa)); sa.sun_family=AF_UNIX; - strncpy(sa.sun_path+1,addr.toUtf8(),UNIX_PATH_MAX-1); + strncpy(sa.sun_path+1,addr.toUtf8(),UNIX_PATH_MAX-2); if(::connect(sock,(struct sockaddr *)(&sa),sizeof(sa))<0) { return false; }