File kftpgrabber-0.8.1-bufferoverflow.patch of Package kftpgrabber

--- kftpgrabber/src/misc/desencryptor.cpp~	2009-03-12 18:02:06.000000000 +0100
+++ kftpgrabber/src/misc/desencryptor.cpp	2009-03-12 18:02:06.000000000 +0100
@@ -65,8 +65,8 @@
   char *o_message = (char*) malloc(8);
   char *o_output = (char*) malloc(8);
   
-  memset(o_message, 0, 9);
-  memset(o_output, 0, 9);
+  memset(o_message, 0, sizeof o_message);
+  memset(o_output, 0, sizeof o_output);
   //out.resize(in.size() * 2);
   
   while (i < in.size()) {
@@ -79,8 +79,8 @@
     i += 8;
     
     // Clear everything
-    memset(o_message, 0, 9);
-    memset(o_output, 0, 9);
+    memset(o_message, 0, sizeof o_message);
+    memset(o_output, 0, sizeof o_output);
   }
   
   free(o_message);
openSUSE Build Service is sponsored by