Преглед на файлове

Fix buffer overlow when checking hashed passwords

svn:r4308
Nick Mathewson преди 20 години
родител
ревизия
9f24078452
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      src/or/control.c

+ 1 - 1
src/or/control.c

@@ -481,7 +481,7 @@ decode_hashed_password(char *buf, const char *hashed)
       }
   }
   if (buf)
-    memcpy(buf, decoded, sizeof(decoded));
+    memcpy(buf, decoded, S2K_SPECIFIER_LEN+DIGEST_LEN);
   return 0;
 }