This commit is contained in:
vysheng 2013-12-25 13:07:10 +04:00
parent cb29ce4523
commit df3dc01306

View file

@ -309,7 +309,6 @@ extern struct dc *DC_working;
void out_random (int n) {
assert (n <= 32);
static char buf[32];
int i;
secure_random (buf, n);
out_cstring (buf, n);
}
@ -770,7 +769,9 @@ void encr_start (void) {
void encr_finish (struct secret_chat *E) {
int l = packet_ptr - (encr_extra + 8);
while (((packet_ptr - encr_extra) - 3) & 3) {
out_rand (4);
int t;
secure_random (&t, 4);
out_int (t);
}
*encr_extra = ((packet_ptr - encr_extra) - 1) * 4 * 256 + 0xfe;