summaryrefslogtreecommitdiff
path: root/http.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-05-30 12:51:27 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-05-30 12:51:28 (GMT)
commit7c3d15fe3113cf48db60656eedd152c46f47bf6b (patch)
treeafcbf8eb2ae30d903c3649aab8093a8c3a8f4b82 /http.h
parentb2fd6592943db80ef9bfccbf55d65a39268d76ed (diff)
parentac4896f007a624c12feda866aeb4abe8a1394e39 (diff)
downloadgit-7c3d15fe3113cf48db60656eedd152c46f47bf6b.zip
git-7c3d15fe3113cf48db60656eedd152c46f47bf6b.tar.gz
git-7c3d15fe3113cf48db60656eedd152c46f47bf6b.tar.bz2
Merge branch 'jk/snprintf-truncation'
Avoid unchecked snprintf() to make future code auditing easier. * jk/snprintf-truncation: fmt_with_err: add a comment that truncation is OK shorten_unambiguous_ref: use xsnprintf fsmonitor: use internal argv_array of struct child_process log_write_email_headers: use strbufs http: use strbufs instead of fixed buffers
Diffstat (limited to 'http.h')
-rw-r--r--http.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/http.h b/http.h
index 4df4a25..d305ca1 100644
--- a/http.h
+++ b/http.h
@@ -207,7 +207,7 @@ struct http_pack_request {
struct packed_git *target;
struct packed_git **lst;
FILE *packfile;
- char tmpfile[PATH_MAX];
+ struct strbuf tmpfile;
struct active_request_slot *slot;
};
@@ -219,7 +219,7 @@ extern void release_http_pack_request(struct http_pack_request *preq);
/* Helpers for fetching object */
struct http_object_request {
char *url;
- char tmpfile[PATH_MAX];
+ struct strbuf tmpfile;
int localfile;
CURLcode curl_result;
char errorstr[CURL_ERROR_SIZE];