2021-06-02 Fred Gleason <fredg@paravelsystems.com>

* Cleaned up compile warnings in 'lib/rdconfig.cpp'.
	* Cleaned up compile warnings in 'lib/rddelete.cpp'.
	* Cleaned up compile warnings in 'lib/rdmblookup.cpp'.
	* Cleaned up compile warnings in 'lib/rdtempdirectory.cpp'.
	* Cleaned up compile warnings in 'lib/rdunixserver.cpp'.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2021-06-02 12:24:01 -04:00
parent ed14f32f09
commit 38d3fd459e
6 changed files with 17 additions and 12 deletions

View File

@@ -2,7 +2,7 @@
//
// Securely create and then remove a temporary directory
//
// (C) Copyright 2017-2018 Fred Gleason <fredg@paravelsystems.com>
// (C) Copyright 2017-2021 Fred Gleason <fredg@paravelsystems.com>
//
// 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
@@ -61,7 +61,7 @@ bool RDTempDirectory::create(QString *err_msg)
{
char tempdir[PATH_MAX];
strncpy(tempdir,RDTempDirectory::basePath().toUtf8(),PATH_MAX);
strncpy(tempdir,RDTempDirectory::basePath().toUtf8(),PATH_MAX-1);
strncat(tempdir,"/",PATH_MAX-strlen(tempdir));
strncat(tempdir,temp_base_name.toUtf8(),PATH_MAX-strlen(tempdir));
strncat(tempdir,"XXXXXX",PATH_MAX-strlen(tempdir));