Thursday, January 1, 2015

About the recent claims of viruses in devcppPortable.exe

Recently, a lot of reports of antivirus programs marking the file devcppPortable.exe as a virus/trojan/unwanted program have surfaced. I can assure you that the files you download from SourceForge do NOT contain any of that.

To prove my statement, let us check the source code of devcppPortable.exe. It can be found in the Source\Tools\DevCppPortable folder in the source zip files provided here or in the Git repo here.

Let's walk through the code step by step:
#include <windows.h>
#include <Shlwapi.h>
#include <string>
using std::wstring;
The included files are unchanged versions of the ones found in TDM-GCC 4.8.1.
int main() {
int ArgumentCount = 0;
wchar_t** ArgumentInput = CommandLineToArgvW(GetCommandLineW(),&ArgumentCount);
wstring ArgumentsToDev = L"-c .\\config ";
for(int i = 1;i < ArgumentCount;i++) {
  ArgumentsToDev += '\"';
  ArgumentsToDev += ArgumentInput[i];
  ArgumentsToDev += '\"';
  if(i != ArgumentCount - 1) {
    ArgumentsToDev += ' ';
  }
}
LocalFree(ArgumentInput);
Over here, devcppPortable builds a string ArgumentsToDev which consists of the -c command that tells devcpp.exe to store its configuration files elsewhere AND the commands that have been passed to devcppPortable. Think of files that are dragged onto devcppPortable.exe in explorer or Auto-Open binds that use devcppPortable. All it does is forward these commands to devcpp.exe
wchar_t CurrentDirectory[32768];
GetModuleFileNameW(NULL,CurrentDirectory,32768);
PathRemoveFileSpecW(CurrentDirectory);
Over here, the directory where devcppPortable is located is stored in array CurrentDirectory.
int Result = (INT_PTR)ShellExecuteW(
  NULL, // no parent window
  L"open", // open the file
  L"devcpp.exe", // the file to open
  ArgumentsToDev.c_str(), // extra parameters to pass
  CurrentDirectory, // use the current directory
  SW_SHOWNORMAL // activate and display window
);
if(Result <= 32) {
  switch(Result) {
    case ERROR_FILE_NOT_FOUND: {
      MessageBoxW(NULL,L"devcpp.exe",L"File not found",MB_OK);
      break;
    }
    default: {
      MessageBoxW(NULL,L"An unspecified error has occured!",L"Error",MB_OK);
      break;
    }
  }
}
return 0;
Lastly, devcpp.exe is launched using the provided arguments and using the current directory using the not-so special ShellExecute function.

In other words, this file is harmless. My educated guess as to why this file is marked as an unwanted file is that real unwanted files (especially trojans) exhibit the same behaviour. They also function as hosts that execute external code. Since devcppPortable exhibits the same behaviour, the scanner will think "Hey, this program shows behaviour similar to the other million trojan files in our database. Let's tell the user it is one too to be sure".

What can you do as a user? Please report devcppPortable.exe as a false positive.

Wednesday, December 31, 2014

Saturday, November 15, 2014

Dev-C++ 5.8.3 released

Incremental update.!

Changes - Version 5.8.3 - 15 November 2014
  • Slightly decreased flicker during editor opening.
  • Makefiles are now highlighted as if they are source files.
  • Opening braces after a 'default' keyword are now completed correctly.
  • Fixed a bug in NewFunctionFrm and NewVarFrm that caused crashes (thank you for reporting).
  • Rewritten ancient source code of devcppPortable.exe. It is now immune to overflows due to arguments of length more than 400.
  • Fixed a bug in TCppParser that caused it to ignore project include paths.
  • Fixed a crash in TCppTokenizer due to spaces before #include in combination with comments after the or "file" part (like " #include // bar").

Download
  • The setup which includes TDM-GCC 4.8.1 (32bit and 64bit) can be downloaded here (47MB).
  • The setup which does not include a compiler can be downloaded here (2MB).
  • The portable version which includes TDM-GCC 4.8.1 (32bit and 64bit) can be downloaded here (34MB).
  • The portable version which does not include a compiler can be downloaded here (2MB).
  • The latest tested compilers can be downloaded here.
  • Lastly, the source code can be found here (1MB). Alternatively, one can use git to clone any commit. Instructions can be found here.

Dev-C++ will automatically configure a 32bit and a 64bit compiler profile for you, and will select the 32bit profile if your computer does not support 64bit.

Sunday, November 2, 2014

Dev-C++ 5.8.2 released

Here's a quick fix for like 80% of the reported bugs. Again, thank you for clicking the report button!

Changes - Version 5.8.2 - 2 November 2014
  • Fixed bug in procedure TMainForm.EditorSaveTimer that corrupted the editor views.
  • Updated provided commit command.

Download
  • The setup which includes TDM-GCC 4.8.1 (32bit and 64bit) can be downloaded here (47MB).
  • The setup which does not include a compiler can be downloaded here (2MB).
  • The portable version which includes TDM-GCC 4.8.1 (32bit and 64bit) can be downloaded here (34MB).
  • The portable version which does not include a compiler can be downloaded here (2MB).
  • The latest tested compilers can be downloaded here.
  • Lastly, the source code can be found here (1MB). Alternatively, one can use git to clone any commit. Instructions can be found here.

Dev-C++ will automatically configure a 32bit and a 64bit compiler profile for you, and will select the 32bit profile if your computer does not support 64bit.

Friday, October 31, 2014

Dev-C++ 5.8.1 released

No new functionality this time, just a lot of fixes and performance improvements.

Changes - Version 5.8.1 - 31 Oktober 2014
  • Fixed an overflow error in TCppParser.CheckForStructs that caused errors when opening/saving files.
  • Fixed a crash in TEditorList.GetFocusedPageControl that fixes random crashes when idling, opening or saving files.
  • Refactored symbol completion code.
  • The code completion window does not show anymore when the cursor changes during the timer rundown after typing . or :: or ->.
  • Improved multiple file opening performance.
  • Improved project closing performance.
  • Updated compilation readme.

Download
  • The setup which includes TDM-GCC 4.8.1 (32bit and 64bit) can be downloaded here (47MB).
  • The setup which does not include a compiler can be downloaded here (2MB).
  • The portable version which includes TDM-GCC 4.8.1 (32bit and 64bit) can be downloaded here (34MB).
  • The portable version which does not include a compiler can be downloaded here (2MB).
  • The latest tested compilers can be downloaded here.
  • Lastly, the source code can be found here (1MB). Alternatively, one can use git to clone any commit. Instructions can be found here.

Dev-C++ will automatically configure a 32bit and a 64bit compiler profile for you, and will select the 32bit profile if your computer does not support 64bit.

Friday, October 24, 2014

Dev-C++ 5.8.0 released

It's alive! After lots of work, I can present you version 5.8.0, which brings multiple views (limited to two at first) to Dev-C++ and fixes the bug that represented 70% of all reported crashes (thank you for clicking on the report button!). Also worth noting is the removal of CVS support in favor of explorer based alternatives of modern alternatives like Git or SVN. Lastly, this is the first version that does not include MinGW by default.

Changes - Version 5.8.0 - 25 Oktober 2014
  • Added support for two file views next to each other.
  • All windows are now opened at the centre of the main window instead of at random places across random monitors.
  • Slightly improved performance of the function tooltip.
  • Fixed a bug in makefile creation of C DLL's that prevented compilation (no DEF problems anymore!).
  • When compiling, header files are now treated separately from other files.
  • Removed CVS support. CVS is considered deprecated, we recommend using explorer based code managers for alternatives like Git or SVN.
  • Removed MinGW from default builds due to lack of reason to use it and generally inferior stability. At this point in time, there is no reason to use MinGW instead of TDM-GCC (which is based on MinGW64): both support 32bit compiling, but TDM has much more features, takes up less disk space and generates less crashes.
  • Fixed a crash in the file change monitor code (this represented 70% of all crashes; guess what, it was an off-by-one error).

Download
  • The setup which includes TDM-GCC 4.8.1 (32bit and 64bit) can be downloaded here (47MB).
  • The setup which does not include a compiler can be downloaded here (2MB).
  • The portable version which includes TDM-GCC 4.8.1 (32bit and 64bit) can be downloaded here (34MB).
  • The portable version which does not include a compiler can be downloaded here (2MB).
  • The latest tested compilers can be downloaded here.
  • Lastly, the source code can be found here (1MB). Alternatively, one can use git to clone any commit. Instructions can be found here.

Dev-C++ will automatically configure a 32bit and a 64bit compiler profile for you, and will select the 32bit profile if your computer does not support 64bit.

Wednesday, July 30, 2014

Dev-C++ 5.7.1 released

Changes - Version 5.7.1 - 30 Juli 2014
  • Resolved errors in compile log when using Syntax Check on non-project compilations.
  • One can now create precompiled headers when compiling non-project header files.
  • Compile log now mentions the output filename under Compilation Results.
  • Dev-C++ will now issue an error when compiling using a compiler set that does not have a valid binary directory.
  • When a currently open file is renamed or deleted, one can now choose to close the editor of the file in question.
  • Fixed a bug in "Shorten Compiler Paths" that mixed up library and binary paths.
  • Attempt to fix a common crash related to TdevMonitorThread.TellToQuit.
  • Reduced overdraw in the class browser when switching between or saving files.
  • Added the ability to syntax check the currently visible file only, even if it belongs to a project.
  • Added icons for Syntax Check, Syntax Check Current File and Clean.
  • Fixed an out of bounds problem in the parser.
  • Dev-C++ now restores windows to their Aero Snap position.

Download
  • The setup which includes MinGW32 4.8.1 can be downloaded here (63MB).
  • The setup which includes TDM-GCC x64 4.8.1 can be downloaded here (47MB).
  • The setup which does not include a compiler can be downloaded here (2MB).
  • The portable version which includes MinGW32 4.8.1 can be downloaded here (36MB).
  • The portable version which includes TDM-GCC x64 4.8.1 can be downloaded here (34MB).
  • The portable version which does not include a compiler can be downloaded here (2MB).
  • The latest tested compilers can be downloaded here.
  • Lastly, the source code can be found here (1MB).



Choosing between 32bit and 64bit
  • The 64bit compiler will fully work op 32bit systems.
  • The 64bit compiler can create 64bit and 32bit executables and DLLs.
  • The 64bit compiler currently provides much more headers and libraries.
  • The 32bit compiler can only create 32bit executables and DLLs.