]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/debugrpt.cpp
fixing overrelease and out-of-bounds write, fixes #13725
[wxWidgets.git] / src / common / debugrpt.cpp
index 6f0327e59ec96d9770b182f3b72f35d935d85342..d98c9cb044b855c784658ac98e2c9abb1454bd3e 100644 (file)
@@ -268,8 +268,10 @@ wxDebugReport::AddFile(const wxString& filename, const wxString& description)
         // we need to copy the file to the debug report directory: give it the
         // same name there
         name = fn.GetFullName();
-        wxCopyFile(fn.GetFullPath(),
-                   wxFileName(GetDirectory(), name).GetFullPath());
+
+        if (!wxCopyFile(fn.GetFullPath(),
+                        wxFileName(GetDirectory(), name).GetFullPath()))
+           return;
     }
     else // file relative to the report directory
     {
@@ -685,7 +687,7 @@ bool wxDebugReportUpload::DoProcess()
     wxArrayString output, errors;
     int rc = wxExecute(wxString::Format
                        (
-                            wxT("%s -F %s=@\"%s\" %s"),
+                            wxT("%s -F \"%s=@%s\" %s"),
                             m_curlCmd.c_str(),
                             m_inputField.c_str(),
                             GetCompressedFileName().c_str(),