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.
 .
 cbmc (4.9-4) unstable; urgency=low
 .
   * Work around binutils regression using ar rcf instead of ld -r. Thanks
     Matthias Klose for the suggestion. (Closes: #763228)
Author: Michael Tautschnig <mt@debian.org>
Bug-Debian: http://bugs.debian.org/763228

---
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: http://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>

--- cbmc-4.9.orig/src/util/tempdir.cpp
+++ cbmc-4.9/src/util/tempdir.cpp
@@ -12,6 +12,7 @@ Author: CM Wintersteiger
 #include <direct.h>
 #endif
 
+#include <cassert>
 #include <cstdlib>
 #include <cstring>
 
@@ -164,7 +165,8 @@ temp_working_dirt::temp_working_dirt(con
   temp_dirt(name_template)
 {
   old_working_directory=get_current_working_directory();
-  chdir(path.c_str());
+  if(chdir(path.c_str())!=0)
+    assert(false);
 }
 
 /*******************************************************************\
@@ -181,6 +183,7 @@ Function: temp_working_dirt::~temp_worki
 
 temp_working_dirt::~temp_working_dirt()
 {
-  chdir(old_working_directory.c_str());
+  if(chdir(old_working_directory.c_str())!=0)
+    assert(false);
 }
 
