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
06a5c70f
Commit
06a5c70f
authored
20 years ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
Kjetil Jacobsen reported an open file leak in file:// transfers of empty
files.
parent
62af3fb7
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
CHANGES
+10
-0
10 additions, 0 deletions
CHANGES
lib/file.c
+5
-3
5 additions, 3 deletions
lib/file.c
with
15 additions
and
3 deletions
CHANGES
+
10
−
0
View file @
06a5c70f
...
...
@@ -6,6 +6,16 @@
Changelog
Daniel (17 August 2004)
- Kjetil Jacobsen noticed that when transferring a file:// URL pointing to an
empty file, libcurl would return with the file still open.
- Alexander Krasnostavsky pointed out that the configure script needs to define
_THREAD_SAFE for AIX systems to make libcurl built really thread-safe.
Also added a check for the xlc compiler on AIX, and if that is detect we use
the -qthreaded compiler option
Daniel (16 August 2004)
- libcurl now allows a custom "Accept-Encoding:" header override the
internally set one that gets set with CURLOPT_ENCODING. Pointed out by Alex.
...
...
This diff is collapsed.
Click to expand it.
lib/file.c
+
5
−
3
View file @
06a5c70f
...
...
@@ -177,6 +177,9 @@ CURLcode Curl_file_done(struct connectdata *conn,
(
void
)
status
;
/* not used */
Curl_safefree
(
file
->
freepath
);
if
(
file
->
fd
!=
-
1
)
close
(
file
->
fd
);
return
CURLE_OK
;
}
...
...
@@ -227,7 +230,7 @@ static CURLcode file_upload(struct connectdata *conn)
int
readcount
;
res
=
Curl_fillreadbuffer
(
conn
,
BUFSIZE
,
&
readcount
);
if
(
res
)
re
turn
res
;
b
re
ak
;
nread
=
(
size_t
)
readcount
;
...
...
@@ -383,8 +386,7 @@ CURLcode Curl_file(struct connectdata *conn)
if
(
Curl_pgrsUpdate
(
conn
))
res
=
CURLE_ABORTED_BY_CALLBACK
;
close
(
fd
);
return
res
;
}
#endif
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