diff --git a/components/crashcatcher/crashcatcher.cpp b/components/crashcatcher/crashcatcher.cpp index 99df2cfd8..307c08d95 100644 --- a/components/crashcatcher/crashcatcher.cpp +++ b/components/crashcatcher/crashcatcher.cpp @@ -143,8 +143,14 @@ static void gdb_info(pid_t pid) FILE *f; int fd; - /* Create a temp file to put gdb commands into */ + /* + * Create a temp file to put gdb commands into. + * Note: POSIX.1-2008 declares that the file should be already created with mode 0600 by default. + * Modern systems implement it and and suggest to do not touch masks in multithreaded applications. + * So CoverityScan warning is valid only for ancient versions of stdlib. + */ strcpy(respfile, "/tmp/gdb-respfile-XXXXXX"); + // coverity[secure_temp] if((fd=mkstemp(respfile)) >= 0 && (f=fdopen(fd, "w")) != nullptr) { fprintf(f, "attach %d\n"