diff --git a/ChangeLog b/ChangeLog
index 62f6f027..21b6d0a4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2014-11-14  Rene Liebscher <R.Liebscher@gmx.de>
+
+	bug #40142 Floating point exception on Ubuntu 10.04
+	* avr.c: avoid division by zero in report_progress(), eg. when 
+	writing an empty eeprom file were total becomes 0
+
 2014-11-13  Rene Liebscher <R.Liebscher@gmx.de>
 
 	patch #8504 buspirate: Also support "cpufreq" extended parameter
diff --git a/avr.c b/avr.c
index 8a777845..8df586a3 100644
--- a/avr.c
+++ b/avr.c
@@ -1214,7 +1214,7 @@ void report_progress (int completed, int total, char *hdr)
 {
   static int last = 0;
   static double start_time;
-  int percent = (completed * 100) / total;
+  int percent = (total > 0) ? ((completed * 100) / total) : 100;
   struct timeval tv;
   double t;