mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
dtsession: Coverity (memory corruption, moderate)
This commit is contained in:
parent
055d98cafb
commit
611dda1831
3 changed files with 5 additions and 5 deletions
|
@ -1255,7 +1255,7 @@ SetFontSavePath(char *langPtr)
|
|||
sessionSaved = SM_HOME_FONT_DIRECTORY;
|
||||
}
|
||||
|
||||
sprintf(smGD.fontPath, "%s/%s", smGD.savePath, sessionSaved);
|
||||
snprintf(smGD.fontPath, MAXPATHLEN, "%s/%s", smGD.savePath, sessionSaved);
|
||||
status = stat(smGD.fontPath, &buf);
|
||||
if(status == -1)
|
||||
{
|
||||
|
@ -1272,8 +1272,8 @@ SetFontSavePath(char *langPtr)
|
|||
/*
|
||||
* Now add the lang subdirectory and see if it exists
|
||||
*/
|
||||
strcat(smGD.fontPath, "/");
|
||||
strcat(smGD.fontPath, langPtr);
|
||||
strncat(smGD.fontPath, "/", MAXPATHLEN);
|
||||
strncat(smGD.fontPath, langPtr, MAXPATHLEN);
|
||||
status = stat(smGD.fontPath, &buf);
|
||||
if(status == -1)
|
||||
{
|
||||
|
|
|
@ -1815,7 +1815,7 @@ static int
|
|||
RestoreClients( void )
|
||||
{
|
||||
unsigned char *lineP, *string;
|
||||
char *pch, *dispPtr;
|
||||
char *pch, *dispPtr = NULL;
|
||||
char *dispEnv, *dispSav, *dispEnvHelpview, *dispSavHelpview;
|
||||
unsigned char *hostPtr=NULL, *cmdPtr=NULL, *hintPtr = NULL;
|
||||
unsigned char *remoteDisplay;
|
||||
|
|
|
@ -726,7 +726,7 @@ convert_selection(
|
|||
int *format )
|
||||
{
|
||||
char pixels[50];
|
||||
int i, screen_number;
|
||||
int i, screen_number = 0;
|
||||
char *temp;
|
||||
char *str_type_return;
|
||||
XrmValue value_return;
|
||||
|
|
Loading…
Reference in a new issue