Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OpenVPN TLS Crypt V2 Plugins
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Emily Ehlert
OpenVPN TLS Crypt V2 Plugins
Commits
48557e9e
Commit
48557e9e
authored
1 year ago
by
Emily Ehlert
Browse files
Options
Downloads
Patches
Plain Diff
Fix problematic strcpy
parent
72449b5c
Branches
Branches containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
YubikeyKeyDerivationLibrary/openvpn_yubikey_key_management.c
+3
-2
3 additions, 2 deletions
YubikeyKeyDerivationLibrary/openvpn_yubikey_key_management.c
with
3 additions
and
2 deletions
YubikeyKeyDerivationLibrary/openvpn_yubikey_key_management.c
+
3
−
2
View file @
48557e9e
...
@@ -206,8 +206,9 @@ OPENVPN_EXPORT int openvpn_plugin_open_v3(const int v3structver, struct openvpn_
...
@@ -206,8 +206,9 @@ OPENVPN_EXPORT int openvpn_plugin_open_v3(const int v3structver, struct openvpn_
// Access Code
// Access Code
if
(
strcmp
(
argv
[
2
],
"0"
)
!=
0
)
if
(
strcmp
(
argv
[
2
],
"0"
)
!=
0
)
{
{
context
->
acc_code
=
calloc
(
strlen
(
argv
[
2
])
+
1
,
sizeof
(
char
));
unsigned
long
access_code_length
=
strlen
(
argv
[
2
])
+
1
;
strcpy
(
context
->
acc_code
,
argv
[
2
]);
context
->
acc_code
=
calloc
(
access_code_length
,
sizeof
(
char
));
snprintf
(
context
->
acc_code
,
access_code_length
,
"%s"
,
argv
[
2
]);
plog
(
PLOG_DEBUG
,
"Using access code %s"
,
context
->
acc_code
);
plog
(
PLOG_DEBUG
,
"Using access code %s"
,
context
->
acc_code
);
if
(
!
context
->
acc_code
)
if
(
!
context
->
acc_code
)
{
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment