Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
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
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
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
f8b4ba80
Commit
f8b4ba80
authored
20 years ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
krb4 fixed
parent
527f70e5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/krb4.c
+5
-5
5 additions, 5 deletions
lib/krb4.c
lib/security.c
+8
-6
8 additions, 6 deletions
lib/security.c
with
13 additions
and
11 deletions
lib/krb4.c
+
5
−
5
View file @
f8b4ba80
...
...
@@ -200,7 +200,7 @@ krb4_auth(void *app_data, struct connectdata *conn)
int
ret
;
char
*
p
;
unsigned
char
*
ptr
;
in
t
len
;
size_
t
len
;
KTEXT_ST
adat
;
MSG_DAT
msg_data
;
int
checksum
;
...
...
@@ -324,7 +324,7 @@ CURLcode Curl_krb_kauth(struct connectdata *conn)
char
*
name
;
char
*
p
;
char
passwd
[
100
];
in
t
tmp
;
size_
t
tmp
;
ssize_t
nread
;
int
save
;
CURLcode
result
;
...
...
@@ -355,11 +355,11 @@ CURLcode Curl_krb_kauth(struct connectdata *conn)
p
+=
2
;
tmp
=
Curl_base64_decode
(
p
,
&
ptr
);
if
(
len
>
sizeof
(
tkt
.
dat
)
-
1
)
{
if
(
tmp
>
=
sizeof
(
tkt
.
dat
))
{
free
(
ptr
);
len
=
0
;
tmp
=
0
;
}
if
(
!
len
||
!
ptr
)
{
if
(
!
tmp
||
!
ptr
)
{
Curl_failf
(
conn
->
data
,
"Failed to decode base64 in reply.
\n
"
);
Curl_set_command_prot
(
conn
,
save
);
return
CURLE_FTP_WEIRD_SERVER_REPLY
;
...
...
This diff is collapsed.
Click to expand it.
lib/security.c
+
8
−
6
View file @
f8b4ba80
...
...
@@ -297,13 +297,15 @@ int
Curl_sec_read_msg
(
struct
connectdata
*
conn
,
char
*
s
,
int
level
)
{
int
len
;
char
*
buf
;
unsigned
char
*
buf
;
int
code
;
buf
=
malloc
(
strlen
(
s
));
len
=
Curl_base64_decode
(
s
+
4
,
buf
);
/* XXX */
len
=
Curl_base64_decode
(
s
+
4
,
&
buf
);
/* XXX */
if
(
len
>
0
)
len
=
(
conn
->
mech
->
decode
)(
conn
->
app_data
,
buf
,
len
,
level
,
conn
);
else
return
-
1
;
len
=
(
conn
->
mech
->
decode
)(
conn
->
app_data
,
buf
,
len
,
level
,
conn
);
if
(
len
<
0
)
{
free
(
buf
);
return
-
1
;
...
...
@@ -314,10 +316,10 @@ Curl_sec_read_msg(struct connectdata *conn, char *s, int level)
if
(
buf
[
3
]
==
'-'
)
code
=
0
;
else
sscanf
(
buf
,
"%d"
,
&
code
);
sscanf
(
(
char
*
)
buf
,
"%d"
,
&
code
);
if
(
buf
[
len
-
1
]
==
'\n'
)
buf
[
len
-
1
]
=
'\0'
;
strcpy
(
s
,
buf
);
strcpy
(
s
,
(
char
*
)
buf
);
free
(
buf
);
return
code
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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