Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 stopmotion (0.8.0-2) unstable; urgency=medium
 .
   * Merge upstream fixes
     - da7af98 corrected README. 'make' makes just release, not release+debug
     - 678cdf7 Fix lintian issue desktop-mime-but-no-exec-code
     - 473a291 Removed last PATH_MAX references to allow it to compile on Hurd
   * disable dh_auto_test because it fails on the autobuilders
Author: Barak A. Pearlmutter <bap@debian.org>

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>

--- stopmotion-0.8.0.orig/README
+++ stopmotion-0.8.0/README
@@ -39,9 +39,9 @@ DEVELOPMENT
 
 After qmake, the following make targets are available:
 
+make         # build a release version of the project, called stopmotion
 make debug   # build a debug version of the project, called stopmotion-d
-make release # build a release version of the project, called stopmotion
-make         # build both debug and release versions
+make all     # build both debug and release versions
 make install # build and install the release version in /usr/local
 make test    # build and run the unit tests
 
--- stopmotion-0.8.0.orig/src/presentation/frontends/nonguifrontend/nonguifrontend.cpp
+++ stopmotion-0.8.0/src/presentation/frontends/nonguifrontend/nonguifrontend.cpp
@@ -31,6 +31,7 @@
 #include <errno.h>
 #include <string>
 #include <string.h>
+#include <sstream>
 
 
 NonGUIFrontend::NonGUIFrontend(DomainFacade *facadePtr)
@@ -237,12 +238,13 @@ int NonGUIFrontend::checkFiles(const cha
 	if (dp) {
 		struct dirent *ep;
 		struct stat st;
-		char tmp[PATH_MAX] = {0};
+		std::stringstream path;
 
 		while ( (ep = readdir(dp)) ) {
-			snprintf(tmp, sizeof(tmp), "%s%s", directory, ep->d_name);
-			tmp[sizeof(tmp) - 1] = '\0';  // ensure null-terminated
-			stat(tmp, &st);
+			path.str("");
+			path << directory << ep->d_name;
+			std::string p(path.str());
+			stat(p.c_str(), &st);
 			// is a regular file, not a directory
 			if ( S_ISREG(st.st_mode) != 0) {
 				++numSuccessFull;
--- stopmotion-0.8.0.orig/src/presentation/frontends/qtfrontend/mainwindowgui.cpp
+++ stopmotion-0.8.0/src/presentation/frontends/qtfrontend/mainwindowgui.cpp
@@ -62,6 +62,7 @@
 
 #include <cstdlib>
 #include <unistd.h>
+#include <sstream>
 
 using namespace std;
 using namespace Qt;
@@ -920,20 +921,26 @@ void MainWindowGUI::exportToVideo()
 	}
 	else {
 		bool isCanceled = false;
-		char tmp[PATH_MAX];
+		std::stringstream key;
+		std::string k;
 		VideoEncoder enc;
 
-		sprintf(tmp, "startEncoder%d", active);
-		Preference start(tmp, "");
+		key << "startEncoder" << active;
+		k = key.str();
+		Preference start(k.c_str(), "");
 		enc.setStartCommand(start.get());
 
-		sprintf(tmp, "stopEncoder%d", active);
-		Preference stop(tmp, "");
+		key.str("");
+		key << "stopEncoder" << active;
+		k = key.str();
+		Preference stop(k.c_str(), "");
 		enc.setStopCommand(stop.get());
 
-		sprintf(tmp, "outputFile%d", active);
-		Preference output(tmp);
-		if (output.get()) {
+		key.str("");
+		key << "outputFile" << active;
+		k = key.str();
+		Preference output(k.c_str());
+		if (output.get() && *output.get()) {
 			enc.setOutputFile(output.get());
 		} else {
 			QString file = QFileDialog::
--- stopmotion-0.8.0.orig/stopmotion.desktop
+++ stopmotion-0.8.0/stopmotion.desktop
@@ -2,7 +2,7 @@
 Name=Stopmotion
 Icon=stopmotion
 Comment=Program to create stop-motion animations
-Exec=stopmotion
+Exec=stopmotion %f
 Terminal=false
 Type=Application
 Categories=AudioVideo;Video;AudioVideoEditing;KDE;Qt;
