Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
lwc
/
candidates
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
7fe0ba3c
authored
Jul 20, 2020
by
Enrico Pozzobon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed new knot implementation memset overflow
parent
694fe7f9
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
knot/Implementations/crypto_aead/knot128v1/armcortexm_3/encrypt.c
+1
-1
knot/Implementations/crypto_aead/knot128v2/armcortexm_3/encrypt.c
+1
-1
knot/Implementations/crypto_aead/knot192/armcortexm_3/encrypt.c
+1
-1
knot/Implementations/crypto_aead/knot256/armcortexm_3/encrypt.c
+1
-1
No files found.
knot/Implementations/crypto_aead/knot128v1/armcortexm_3/encrypt.c
View file @
7fe0ba3c
...
...
@@ -237,8 +237,8 @@ int crypto_aead_decrypt(unsigned char *m, unsigned long long *mlen,
unpackFormat
(
tempU8
,
s
);
unpackFormat
((
tempU8
+
8
),
(
s
+
2
));
if
(
memcmp
((
void
*
)
tempU8
,
(
void
*
)
c
,
CRYPTO_ABYTES
))
{
memset
(
m
,
0
,
sizeof
(
unsigned
char
)
*
(
*
mlen
));
*
mlen
=
0
;
memset
(
m
,
0
,
sizeof
(
unsigned
char
)
*
(
clen
-
CRYPTO_ABYTES
));
return
-
1
;
}
return
0
;
...
...
knot/Implementations/crypto_aead/knot128v2/armcortexm_3/encrypt.c
View file @
7fe0ba3c
...
...
@@ -248,8 +248,8 @@ int crypto_aead_decrypt(unsigned char *m, unsigned long long *mlen,
unpackU96FormatToThreePacket
(
tempU8
,
s
);
unpackU96FormatToThreePacket
((
tempU8
+
12
),
(
s
+
3
));
if
(
memcmp
((
void
*
)
tempU8
,
(
void
*
)
c
,
CRYPTO_ABYTES
))
{
memset
(
m
,
0
,
sizeof
(
unsigned
char
)
*
(
*
mlen
));
*
mlen
=
0
;
memset
(
m
,
0
,
sizeof
(
unsigned
char
)
*
(
clen
-
CRYPTO_ABYTES
));
return
-
1
;
}
return
0
;
...
...
knot/Implementations/crypto_aead/knot192/armcortexm_3/encrypt.c
View file @
7fe0ba3c
...
...
@@ -202,8 +202,8 @@ int crypto_aead_decrypt(unsigned char *m, unsigned long long *mlen,
unpackU96FormatToThreePacket
(
tempU8
,
s
);
unpackU96FormatToThreePacket
((
tempU8
+
12
),
(
s
+
3
));
if
(
memcmp
((
void
*
)
tempU8
,
(
void
*
)
c
,
CRYPTO_ABYTES
))
{
memset
(
m
,
0
,
sizeof
(
unsigned
char
)
*
(
*
mlen
));
*
mlen
=
0
;
memset
(
m
,
0
,
sizeof
(
unsigned
char
)
*
(
clen
-
CRYPTO_ABYTES
));
return
-
1
;
}
return
0
;
...
...
knot/Implementations/crypto_aead/knot256/armcortexm_3/encrypt.c
View file @
7fe0ba3c
...
...
@@ -320,8 +320,8 @@ int crypto_aead_decrypt(
unpackU128FormatToFourPacket
(
tempU8
,
s
);
unpackU128FormatToFourPacket
((
tempU8
+
16
),
(
s
+
4
));
if
(
memcmp
((
void
*
)
tempU8
,
(
void
*
)
c
,
CRYPTO_ABYTES
))
{
memset
(
m
,
0
,
sizeof
(
unsigned
char
)
*
(
*
mlen
));
*
mlen
=
0
;
memset
(
m
,
0
,
sizeof
(
unsigned
char
)
*
(
clen
-
CRYPTO_ABYTES
));
return
-
1
;
}
return
0
;
...
...
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