Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tg
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
tg
Commits
9cebc24d
Commit
9cebc24d
authored
Sep 23, 2014
by
Vysheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mtproto-client: fixed bad bignum pad
parent
ce1d3a13
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
mtproto-client.c
mtproto-client.c
+2
-2
No files found.
mtproto-client.c
View file @
9cebc24d
...
@@ -506,7 +506,7 @@ int tglmp_check_g (unsigned char p[256], BIGNUM *g) {
...
@@ -506,7 +506,7 @@ int tglmp_check_g (unsigned char p[256], BIGNUM *g) {
static
unsigned
char
s
[
256
];
static
unsigned
char
s
[
256
];
memset
(
s
,
0
,
256
);
memset
(
s
,
0
,
256
);
assert
(
BN_num_bytes
(
g
)
<=
256
);
assert
(
BN_num_bytes
(
g
)
<=
256
);
BN_bn2bin
(
g
,
s
);
BN_bn2bin
(
g
,
s
+
(
256
-
BN_num_bytes
(
g
))
);
int
ok
=
0
;
int
ok
=
0
;
int
i
;
int
i
;
for
(
i
=
0
;
i
<
64
;
i
++
)
{
for
(
i
=
0
;
i
<
64
;
i
++
)
{
...
@@ -541,7 +541,7 @@ int tglmp_check_g (unsigned char p[256], BIGNUM *g) {
...
@@ -541,7 +541,7 @@ int tglmp_check_g (unsigned char p[256], BIGNUM *g) {
int
tglmp_check_g_bn
(
BIGNUM
*
p
,
BIGNUM
*
g
)
{
int
tglmp_check_g_bn
(
BIGNUM
*
p
,
BIGNUM
*
g
)
{
static
unsigned
char
s
[
256
];
static
unsigned
char
s
[
256
];
memset
(
s
,
0
,
256
);
memset
(
s
,
0
,
256
);
assert
(
BN_num_bytes
(
p
)
<
=
256
);
assert
(
BN_num_bytes
(
p
)
=
=
256
);
BN_bn2bin
(
p
,
s
);
BN_bn2bin
(
p
,
s
);
return
tglmp_check_g
(
s
,
g
);
return
tglmp_check_g
(
s
,
g
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment