From: Patrick Steinhardt <ps@pks.im>
To: git@vger.kernel.org
Cc: Jeff King <peff@peff.net>, Junio C Hamano <gitster@pobox.com>,
Eric Sunshine <sunshine@sunshineco.com>
Subject: [PATCH v6 23/27] imap-send: fix leaking memory in `imap_server_conf`
Date: Fri, 7 Jun 2024 08:39:22 +0200 [thread overview]
Message-ID: <04c9cfd34df33f1bc099bfd8f2729a4259584ce9.1717740366.git.ps@pks.im> (raw)
In-Reply-To: <cover.1717740365.git.ps@pks.im>
[-- Attachment #1: Type: text/plain, Size: 4324 bytes --]
We never free any of the config strings that we populate into the
`struct imap_server_conf`. Fix this by creating a common exit path where
we can free resources.
While at it, drop the unused member `imap_server_conf::name`.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
imap-send.c | 65 ++++++++++++++++++++++++++++++++++-------------------
1 file changed, 42 insertions(+), 23 deletions(-)
diff --git a/imap-send.c b/imap-send.c
index 67a7a6c456..da3e7ec17e 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -69,7 +69,6 @@ static void imap_warn(const char *, ...);
static char *next_arg(char **);
struct imap_server_conf {
- const char *name;
char *tunnel;
char *host;
int port;
@@ -1300,23 +1299,28 @@ static int git_imap_config(const char *var, const char *val,
{
struct imap_server_conf *cfg = cb;
- if (!strcmp("imap.sslverify", var))
+ if (!strcmp("imap.sslverify", var)) {
cfg->ssl_verify = git_config_bool(var, val);
- else if (!strcmp("imap.preformattedhtml", var))
+ } else if (!strcmp("imap.preformattedhtml", var)) {
cfg->use_html = git_config_bool(var, val);
- else if (!strcmp("imap.folder", var))
+ } else if (!strcmp("imap.folder", var)) {
+ FREE_AND_NULL(cfg->folder);
return git_config_string(&cfg->folder, var, val);
- else if (!strcmp("imap.user", var))
+ } else if (!strcmp("imap.user", var)) {
+ FREE_AND_NULL(cfg->folder);
return git_config_string(&cfg->user, var, val);
- else if (!strcmp("imap.pass", var))
+ } else if (!strcmp("imap.pass", var)) {
+ FREE_AND_NULL(cfg->folder);
return git_config_string(&cfg->pass, var, val);
- else if (!strcmp("imap.tunnel", var))
+ } else if (!strcmp("imap.tunnel", var)) {
+ FREE_AND_NULL(cfg->folder);
return git_config_string(&cfg->tunnel, var, val);
- else if (!strcmp("imap.authmethod", var))
+ } else if (!strcmp("imap.authmethod", var)) {
+ FREE_AND_NULL(cfg->folder);
return git_config_string(&cfg->auth_method, var, val);
- else if (!strcmp("imap.port", var))
+ } else if (!strcmp("imap.port", var)) {
cfg->port = git_config_int(var, val, ctx->kvi);
- else if (!strcmp("imap.host", var)) {
+ } else if (!strcmp("imap.host", var)) {
if (!val) {
return config_error_nonbool(var);
} else {
@@ -1330,8 +1334,9 @@ static int git_imap_config(const char *var, const char *val,
val += 2;
cfg->host = xstrdup(val);
}
- } else
+ } else {
return git_default_config(var, val, ctx, cb);
+ }
return 0;
}
@@ -1503,6 +1508,7 @@ int cmd_main(int argc, const char **argv)
struct strbuf all_msgs = STRBUF_INIT;
int total;
int nongit_ok;
+ int ret;
setup_git_directory_gently(&nongit_ok);
git_config(git_imap_config, &server);
@@ -1529,42 +1535,55 @@ int cmd_main(int argc, const char **argv)
if (!server.folder) {
fprintf(stderr, "no imap store specified\n");
- return 1;
+ ret = 1;
+ goto out;
}
if (!server.host) {
if (!server.tunnel) {
fprintf(stderr, "no imap host specified\n");
- return 1;
+ ret = 1;
+ goto out;
}
- server.host = "tunnel";
+ server.host = xstrdup("tunnel");
}
/* read the messages */
if (strbuf_read(&all_msgs, 0, 0) < 0) {
error_errno(_("could not read from stdin"));
- return 1;
+ ret = 1;
+ goto out;
}
if (all_msgs.len == 0) {
fprintf(stderr, "nothing to send\n");
- return 1;
+ ret = 1;
+ goto out;
}
total = count_messages(&all_msgs);
if (!total) {
fprintf(stderr, "no messages to send\n");
- return 1;
+ ret = 1;
+ goto out;
}
/* write it to the imap server */
if (server.tunnel)
- return append_msgs_to_imap(&server, &all_msgs, total);
-
+ ret = append_msgs_to_imap(&server, &all_msgs, total);
#ifdef USE_CURL_FOR_IMAP_SEND
- if (use_curl)
- return curl_append_msgs_to_imap(&server, &all_msgs, total);
+ else if (use_curl)
+ ret = curl_append_msgs_to_imap(&server, &all_msgs, total);
#endif
-
- return append_msgs_to_imap(&server, &all_msgs, total);
+ else
+ ret = append_msgs_to_imap(&server, &all_msgs, total);
+
+out:
+ free(server.tunnel);
+ free(server.host);
+ free(server.folder);
+ free(server.user);
+ free(server.pass);
+ free(server.auth_method);
+ return ret;
}
--
2.45.2.436.gcd77e87115.dirty
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2024-06-07 6:39 UTC|newest]
Thread overview: 205+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-29 12:44 [PATCH 00/19] Compile with `-Wwrite-strings` Patrick Steinhardt
2024-05-29 12:44 ` [PATCH 01/19] global: improve const correctness when assigning string constants Patrick Steinhardt
2024-05-29 16:58 ` Junio C Hamano
2024-05-30 11:29 ` Patrick Steinhardt
2024-05-29 12:44 ` [PATCH 02/19] global: assign non-const strings as required Patrick Steinhardt
2024-05-29 17:25 ` Junio C Hamano
2024-05-30 11:29 ` Patrick Steinhardt
2024-05-30 19:38 ` Junio C Hamano
2024-05-31 13:00 ` Patrick Steinhardt
2024-05-31 13:33 ` Patrick Steinhardt
2024-05-31 15:27 ` Junio C Hamano
2024-05-31 15:27 ` Junio C Hamano
2024-06-05 10:46 ` Jeff King
2024-06-05 17:13 ` Junio C Hamano
2024-06-08 10:59 ` Jeff King
2024-06-06 10:36 ` Patrick Steinhardt
2024-05-29 12:44 ` [PATCH 03/19] global: convert intentionally-leaking config strings to consts Patrick Steinhardt
2024-05-29 17:28 ` Junio C Hamano
2024-05-30 11:30 ` Patrick Steinhardt
2024-05-30 16:00 ` Junio C Hamano
2024-05-29 12:44 ` [PATCH 04/19] compat/win32: fix const-correctness with string constants Patrick Steinhardt
2024-05-29 12:44 ` [PATCH 05/19] reftable: improve const correctness when assigning " Patrick Steinhardt
2024-05-29 17:43 ` Junio C Hamano
2024-05-30 11:30 ` Patrick Steinhardt
2024-05-30 16:07 ` Junio C Hamano
2024-05-29 12:44 ` [PATCH 06/19] refspec: remove global tag refspec structure Patrick Steinhardt
2024-05-29 17:47 ` Junio C Hamano
2024-05-29 12:44 ` [PATCH 07/19] http: do not assign string constant to non-const field Patrick Steinhardt
2024-05-29 19:39 ` Junio C Hamano
2024-05-29 12:44 ` [PATCH 08/19] line-log: always allocate the output prefix Patrick Steinhardt
2024-05-29 19:51 ` Junio C Hamano
2024-05-29 12:44 ` [PATCH 09/19] object-file: make `buf` parameter of `index_mem()` a constant Patrick Steinhardt
2024-05-29 20:01 ` Junio C Hamano
2024-05-29 12:44 ` [PATCH 10/19] parse-options: cast long name for OPTION_ALIAS Patrick Steinhardt
2024-05-29 12:44 ` [PATCH 11/19] send-pack: always allocate receive status Patrick Steinhardt
2024-05-29 12:44 ` [PATCH 12/19] remote-curl: avoid assigning string constant to non-const variable Patrick Steinhardt
2024-05-29 20:21 ` Junio C Hamano
2024-05-30 11:30 ` Patrick Steinhardt
2024-05-29 12:45 ` [PATCH 13/19] revision: always store allocated strings in output encoding Patrick Steinhardt
2024-05-29 20:23 ` Junio C Hamano
2024-05-29 12:45 ` [PATCH 14/19] mailmap: always store allocated strings in mailmap blob Patrick Steinhardt
2024-05-29 12:45 ` [PATCH 15/19] imap-send: drop global `imap_server_conf` variable Patrick Steinhardt
2024-05-29 12:45 ` [PATCH 16/19] imap-send: fix leaking memory in `imap_server_conf` Patrick Steinhardt
2024-05-29 20:55 ` Junio C Hamano
2024-05-30 11:31 ` Patrick Steinhardt
2024-05-30 16:30 ` Junio C Hamano
2024-05-29 12:45 ` [PATCH 17/19] builtin/rebase: adapt code to not assign string constants to non-const Patrick Steinhardt
2024-05-29 21:01 ` Junio C Hamano
2024-05-30 11:31 ` Patrick Steinhardt
2024-05-29 12:45 ` [PATCH 18/19] builtin/merge: always store allocated strings in `pull_twohead` Patrick Steinhardt
2024-05-29 12:45 ` [PATCH 19/19] config.mak.dev: enable `-Wwrite-strings` warning Patrick Steinhardt
2024-05-29 12:52 ` [PATCH 00/19] Compile with `-Wwrite-strings` Patrick Steinhardt
2024-05-30 12:50 ` [PATCH v2 " Patrick Steinhardt
2024-05-30 12:50 ` [PATCH v2 01/19] global: improve const correctness when assigning string constants Patrick Steinhardt
2024-05-30 12:50 ` [PATCH v2 02/19] global: assign non-const strings as required Patrick Steinhardt
2024-05-30 12:50 ` [PATCH v2 03/19] global: convert intentionally-leaking config strings to consts Patrick Steinhardt
2024-05-30 12:50 ` [PATCH v2 04/19] compat/win32: fix const-correctness with string constants Patrick Steinhardt
2024-05-30 12:50 ` [PATCH v2 05/19] refspec: remove global tag refspec structure Patrick Steinhardt
2024-05-30 12:50 ` [PATCH v2 06/19] http: do not assign string constant to non-const field Patrick Steinhardt
2024-05-30 12:51 ` [PATCH v2 07/19] line-log: always allocate the output prefix Patrick Steinhardt
2024-05-30 12:51 ` [PATCH v2 08/19] object-file: make `buf` parameter of `index_mem()` a constant Patrick Steinhardt
2024-05-30 12:51 ` [PATCH v2 09/19] parse-options: cast long name for OPTION_ALIAS Patrick Steinhardt
2024-05-30 12:51 ` [PATCH v2 10/19] send-pack: always allocate receive status Patrick Steinhardt
2024-05-30 12:51 ` [PATCH v2 11/19] remote-curl: avoid assigning string constant to non-const variable Patrick Steinhardt
2024-05-30 12:51 ` [PATCH v2 12/19] revision: always store allocated strings in output encoding Patrick Steinhardt
2024-05-30 12:51 ` [PATCH v2 13/19] mailmap: always store allocated strings in mailmap blob Patrick Steinhardt
2024-05-30 12:51 ` [PATCH v2 14/19] imap-send: drop global `imap_server_conf` variable Patrick Steinhardt
2024-05-30 12:51 ` [PATCH v2 15/19] imap-send: fix leaking memory in `imap_server_conf` Patrick Steinhardt
2024-05-30 12:51 ` [PATCH v2 16/19] builtin/rebase: do not assign default backend to non-constant field Patrick Steinhardt
2024-05-30 12:51 ` [PATCH v2 17/19] builtin/rebase: always store allocated string in `options.strategy` Patrick Steinhardt
2024-05-30 12:51 ` [PATCH v2 18/19] builtin/merge: always store allocated strings in `pull_twohead` Patrick Steinhardt
2024-05-30 12:52 ` [PATCH v2 19/19] config.mak.dev: enable `-Wwrite-strings` warning Patrick Steinhardt
2024-05-31 9:13 ` [PATCH v2 00/19] Compile with `-Wwrite-strings` Junio C Hamano
2024-05-31 12:10 ` Patrick Steinhardt
2024-06-03 9:38 ` [PATCH v3 00/27] " Patrick Steinhardt
2024-06-03 9:39 ` [PATCH v3 01/27] global: improve const correctness when assigning string constants Patrick Steinhardt
2024-06-03 9:39 ` [PATCH v3 02/27] global: convert intentionally-leaking config strings to consts Patrick Steinhardt
2024-06-03 9:39 ` [PATCH v3 03/27] refs/reftable: stop micro-optimizing refname allocations on copy Patrick Steinhardt
2024-06-03 18:08 ` Junio C Hamano
2024-06-03 9:39 ` [PATCH v3 04/27] reftable: cast away constness when assigning constants to records Patrick Steinhardt
2024-06-03 9:39 ` [PATCH v3 05/27] refspec: remove global tag refspec structure Patrick Steinhardt
2024-06-03 18:11 ` Junio C Hamano
2024-06-03 9:39 ` [PATCH v3 06/27] builtin/remote: cast away constness in `get_head_names()` Patrick Steinhardt
2024-06-03 9:39 ` [PATCH v3 07/27] diff: cast string constant in `fill_textconv()` Patrick Steinhardt
2024-06-03 9:39 ` [PATCH v3 08/27] line-log: stop assigning string constant to file parent buffer Patrick Steinhardt
2024-06-03 9:39 ` [PATCH v3 09/27] line-log: always allocate the output prefix Patrick Steinhardt
2024-06-03 9:39 ` [PATCH v3 10/27] entry: refactor how we remove items for delayed checkouts Patrick Steinhardt
2024-06-03 9:39 ` [PATCH v3 11/27] ident: add casts for fallback name and GECOS Patrick Steinhardt
2024-06-03 9:39 ` [PATCH v3 12/27] object-file: mark cached object buffers as const Patrick Steinhardt
2024-06-03 9:39 ` [PATCH v3 13/27] object-file: make `buf` parameter of `index_mem()` a constant Patrick Steinhardt
2024-06-03 9:40 ` [PATCH v3 14/27] pretty: add casts for decoration option pointers Patrick Steinhardt
2024-06-03 9:40 ` [PATCH v3 15/27] compat/win32: fix const-correctness with string constants Patrick Steinhardt
2024-06-03 16:57 ` Eric Sunshine
2024-06-03 19:04 ` Junio C Hamano
2024-06-04 6:42 ` Patrick Steinhardt
2024-06-03 9:40 ` [PATCH v3 16/27] http: do not assign string constant to non-const field Patrick Steinhardt
2024-06-03 9:40 ` [PATCH v3 17/27] parse-options: cast long name for OPTION_ALIAS Patrick Steinhardt
2024-06-03 9:40 ` [PATCH v3 18/27] send-pack: always allocate receive status Patrick Steinhardt
2024-06-03 9:40 ` [PATCH v3 19/27] remote-curl: avoid assigning string constant to non-const variable Patrick Steinhardt
2024-06-03 9:40 ` [PATCH v3 20/27] revision: always store allocated strings in output encoding Patrick Steinhardt
2024-06-03 9:40 ` [PATCH v3 21/27] mailmap: always store allocated strings in mailmap blob Patrick Steinhardt
2024-06-03 9:40 ` [PATCH v3 22/27] imap-send: drop global `imap_server_conf` variable Patrick Steinhardt
2024-06-03 9:40 ` [PATCH v3 23/27] imap-send: fix leaking memory in `imap_server_conf` Patrick Steinhardt
2024-06-03 9:40 ` [PATCH v3 24/27] builtin/rebase: do not assign default backend to non-constant field Patrick Steinhardt
2024-06-03 9:40 ` [PATCH v3 25/27] builtin/rebase: always store allocated string in `options.strategy` Patrick Steinhardt
2024-06-03 9:41 ` [PATCH v3 26/27] builtin/merge: always store allocated strings in `pull_twohead` Patrick Steinhardt
2024-06-03 9:41 ` [PATCH v3 27/27] config.mak.dev: enable `-Wwrite-strings` warning Patrick Steinhardt
2024-06-03 16:59 ` [PATCH v3 00/27] Compile with `-Wwrite-strings` Junio C Hamano
2024-06-04 12:36 ` [PATCH v4 " Patrick Steinhardt
2024-06-04 12:36 ` [PATCH v4 01/27] global: improve const correctness when assigning string constants Patrick Steinhardt
2024-06-04 12:37 ` [PATCH v4 02/27] global: convert intentionally-leaking config strings to consts Patrick Steinhardt
2024-06-04 12:37 ` [PATCH v4 03/27] refs/reftable: stop micro-optimizing refname allocations on copy Patrick Steinhardt
2024-06-04 12:37 ` [PATCH v4 04/27] reftable: cast away constness when assigning constants to records Patrick Steinhardt
2024-06-04 12:37 ` [PATCH v4 05/27] refspec: remove global tag refspec structure Patrick Steinhardt
2024-06-04 12:37 ` [PATCH v4 06/27] builtin/remote: cast away constness in `get_head_names()` Patrick Steinhardt
2024-06-04 12:37 ` [PATCH v4 07/27] diff: cast string constant in `fill_textconv()` Patrick Steinhardt
2024-06-04 12:37 ` [PATCH v4 08/27] line-log: stop assigning string constant to file parent buffer Patrick Steinhardt
2024-06-04 12:37 ` [PATCH v4 09/27] line-log: always allocate the output prefix Patrick Steinhardt
2024-06-04 12:37 ` [PATCH v4 10/27] entry: refactor how we remove items for delayed checkouts Patrick Steinhardt
2024-06-04 12:37 ` [PATCH v4 11/27] ident: add casts for fallback name and GECOS Patrick Steinhardt
2024-06-04 12:37 ` [PATCH v4 12/27] object-file: mark cached object buffers as const Patrick Steinhardt
2024-06-06 6:02 ` Junio C Hamano
2024-06-06 6:10 ` Junio C Hamano
2024-06-06 10:03 ` Patrick Steinhardt
2024-06-06 16:25 ` Junio C Hamano
2024-06-07 4:52 ` Patrick Steinhardt
2024-06-04 12:37 ` [PATCH v4 13/27] object-file: make `buf` parameter of `index_mem()` a constant Patrick Steinhardt
2024-06-04 12:37 ` [PATCH v4 14/27] pretty: add casts for decoration option pointers Patrick Steinhardt
2024-06-04 12:38 ` [PATCH v4 15/27] compat/win32: fix const-correctness with string constants Patrick Steinhardt
2024-06-04 12:38 ` [PATCH v4 16/27] http: do not assign string constant to non-const field Patrick Steinhardt
2024-06-04 12:38 ` [PATCH v4 17/27] parse-options: cast long name for OPTION_ALIAS Patrick Steinhardt
2024-06-04 12:38 ` [PATCH v4 18/27] send-pack: always allocate receive status Patrick Steinhardt
2024-06-04 12:38 ` [PATCH v4 19/27] remote-curl: avoid assigning string constant to non-const variable Patrick Steinhardt
2024-06-04 12:38 ` [PATCH v4 20/27] revision: always store allocated strings in output encoding Patrick Steinhardt
2024-06-04 12:38 ` [PATCH v4 21/27] mailmap: always store allocated strings in mailmap blob Patrick Steinhardt
2024-06-04 12:38 ` [PATCH v4 22/27] imap-send: drop global `imap_server_conf` variable Patrick Steinhardt
2024-06-04 12:38 ` [PATCH v4 23/27] imap-send: fix leaking memory in `imap_server_conf` Patrick Steinhardt
2024-06-04 12:38 ` [PATCH v4 24/27] builtin/rebase: do not assign default backend to non-constant field Patrick Steinhardt
2024-06-04 14:06 ` Phillip Wood
2024-06-05 5:40 ` Patrick Steinhardt
2024-06-05 13:06 ` Phillip Wood
2024-06-06 9:50 ` Patrick Steinhardt
2024-06-05 16:11 ` Junio C Hamano
2024-06-04 12:38 ` [PATCH v4 25/27] builtin/rebase: always store allocated string in `options.strategy` Patrick Steinhardt
2024-06-04 14:10 ` Phillip Wood
2024-06-04 12:38 ` [PATCH v4 26/27] builtin/merge: always store allocated strings in `pull_twohead` Patrick Steinhardt
2024-06-04 12:39 ` [PATCH v4 27/27] config.mak.dev: enable `-Wwrite-strings` warning Patrick Steinhardt
2024-06-06 10:27 ` [PATCH v5 00/27] Compile with `-Wwrite-strings` Patrick Steinhardt
2024-06-06 10:27 ` [PATCH v5 01/27] global: improve const correctness when assigning string constants Patrick Steinhardt
2024-06-06 10:27 ` [PATCH v5 02/27] global: convert intentionally-leaking config strings to consts Patrick Steinhardt
2024-06-06 10:27 ` [PATCH v5 03/27] refs/reftable: stop micro-optimizing refname allocations on copy Patrick Steinhardt
2024-06-06 10:28 ` [PATCH v5 04/27] reftable: cast away constness when assigning constants to records Patrick Steinhardt
2024-06-06 10:28 ` [PATCH v5 05/27] refspec: remove global tag refspec structure Patrick Steinhardt
2024-06-06 10:28 ` [PATCH v5 06/27] builtin/remote: cast away constness in `get_head_names()` Patrick Steinhardt
2024-06-06 10:28 ` [PATCH v5 07/27] diff: cast string constant in `fill_textconv()` Patrick Steinhardt
2024-06-06 10:28 ` [PATCH v5 08/27] line-log: stop assigning string constant to file parent buffer Patrick Steinhardt
2024-06-06 10:28 ` [PATCH v5 09/27] line-log: always allocate the output prefix Patrick Steinhardt
2024-06-06 10:28 ` [PATCH v5 10/27] entry: refactor how we remove items for delayed checkouts Patrick Steinhardt
2024-06-06 10:28 ` [PATCH v5 11/27] ident: add casts for fallback name and GECOS Patrick Steinhardt
2024-06-06 10:28 ` [PATCH v5 12/27] object-file: mark cached object buffers as const Patrick Steinhardt
2024-06-06 17:54 ` Junio C Hamano
2024-06-06 10:28 ` [PATCH v5 13/27] object-file: make `buf` parameter of `index_mem()` a constant Patrick Steinhardt
2024-06-06 10:28 ` [PATCH v5 14/27] pretty: add casts for decoration option pointers Patrick Steinhardt
2024-06-06 10:28 ` [PATCH v5 15/27] compat/win32: fix const-correctness with string constants Patrick Steinhardt
2024-06-06 10:29 ` [PATCH v5 16/27] http: do not assign string constant to non-const field Patrick Steinhardt
2024-06-06 10:29 ` [PATCH v5 17/27] parse-options: cast long name for OPTION_ALIAS Patrick Steinhardt
2024-06-06 10:29 ` [PATCH v5 18/27] send-pack: always allocate receive status Patrick Steinhardt
2024-06-06 10:29 ` [PATCH v5 19/27] remote-curl: avoid assigning string constant to non-const variable Patrick Steinhardt
2024-06-06 10:29 ` [PATCH v5 20/27] revision: always store allocated strings in output encoding Patrick Steinhardt
2024-06-06 10:29 ` [PATCH v5 21/27] mailmap: always store allocated strings in mailmap blob Patrick Steinhardt
2024-06-06 10:29 ` [PATCH v5 22/27] imap-send: drop global `imap_server_conf` variable Patrick Steinhardt
2024-06-06 10:29 ` [PATCH v5 23/27] imap-send: fix leaking memory in `imap_server_conf` Patrick Steinhardt
2024-06-06 10:29 ` [PATCH v5 24/27] builtin/rebase: do not assign default backend to non-constant field Patrick Steinhardt
2024-06-06 10:29 ` [PATCH v5 25/27] builtin/rebase: always store allocated string in `options.strategy` Patrick Steinhardt
2024-06-06 10:29 ` [PATCH v5 26/27] builtin/merge: always store allocated strings in `pull_twohead` Patrick Steinhardt
2024-06-06 10:29 ` [PATCH v5 27/27] config.mak.dev: enable `-Wwrite-strings` warning Patrick Steinhardt
2024-06-07 6:37 ` [PATCH v6 00/27] Compile with `-Wwrite-strings` Patrick Steinhardt
2024-06-07 6:37 ` [PATCH v6 01/27] global: improve const correctness when assigning string constants Patrick Steinhardt
2024-06-07 6:37 ` [PATCH v6 02/27] global: convert intentionally-leaking config strings to consts Patrick Steinhardt
2024-06-07 6:37 ` [PATCH v6 03/27] refs/reftable: stop micro-optimizing refname allocations on copy Patrick Steinhardt
2024-06-07 6:37 ` [PATCH v6 04/27] reftable: cast away constness when assigning constants to records Patrick Steinhardt
2024-06-07 6:37 ` [PATCH v6 05/27] refspec: remove global tag refspec structure Patrick Steinhardt
2024-06-07 6:38 ` [PATCH v6 06/27] builtin/remote: cast away constness in `get_head_names()` Patrick Steinhardt
2024-06-07 6:38 ` [PATCH v6 07/27] diff: cast string constant in `fill_textconv()` Patrick Steinhardt
2024-06-07 6:38 ` [PATCH v6 08/27] line-log: stop assigning string constant to file parent buffer Patrick Steinhardt
2024-06-07 6:38 ` [PATCH v6 09/27] line-log: always allocate the output prefix Patrick Steinhardt
2024-06-07 6:38 ` [PATCH v6 10/27] entry: refactor how we remove items for delayed checkouts Patrick Steinhardt
2024-06-07 6:38 ` [PATCH v6 11/27] ident: add casts for fallback name and GECOS Patrick Steinhardt
2024-06-07 6:38 ` [PATCH v6 12/27] object-file: mark cached object buffers as const Patrick Steinhardt
2024-06-07 6:38 ` [PATCH v6 13/27] object-file: make `buf` parameter of `index_mem()` a constant Patrick Steinhardt
2024-06-07 6:38 ` [PATCH v6 14/27] pretty: add casts for decoration option pointers Patrick Steinhardt
2024-06-07 6:38 ` [PATCH v6 15/27] compat/win32: fix const-correctness with string constants Patrick Steinhardt
2024-06-07 6:38 ` [PATCH v6 16/27] http: do not assign string constant to non-const field Patrick Steinhardt
2024-06-07 6:38 ` [PATCH v6 17/27] parse-options: cast long name for OPTION_ALIAS Patrick Steinhardt
2024-06-07 6:38 ` [PATCH v6 18/27] send-pack: always allocate receive status Patrick Steinhardt
2024-06-07 6:39 ` [PATCH v6 19/27] remote-curl: avoid assigning string constant to non-const variable Patrick Steinhardt
2024-06-07 6:39 ` [PATCH v6 20/27] revision: always store allocated strings in output encoding Patrick Steinhardt
2024-06-07 6:39 ` [PATCH v6 21/27] mailmap: always store allocated strings in mailmap blob Patrick Steinhardt
2024-06-07 6:39 ` [PATCH v6 22/27] imap-send: drop global `imap_server_conf` variable Patrick Steinhardt
2024-06-07 6:39 ` Patrick Steinhardt [this message]
2024-06-07 6:39 ` [PATCH v6 24/27] builtin/rebase: do not assign default backend to non-constant field Patrick Steinhardt
2024-06-07 6:39 ` [PATCH v6 25/27] builtin/rebase: always store allocated string in `options.strategy` Patrick Steinhardt
2024-06-07 6:39 ` [PATCH v6 26/27] builtin/merge: always store allocated strings in `pull_twohead` Patrick Steinhardt
2024-06-07 6:39 ` [PATCH v6 27/27] config.mak.dev: enable `-Wwrite-strings` warning Patrick Steinhardt
2024-06-07 17:34 ` [PATCH v6 00/27] Compile with `-Wwrite-strings` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=04c9cfd34df33f1bc099bfd8f2729a4259584ce9.1717740366.git.ps@pks.im \
--to=ps@pks.im \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
--cc=sunshine@sunshineco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).