git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 0/6] use size_t in iconv/strbuf

From
Jeff King <peff@peff.net>
Date
Jul 24, 2018, 10:48 UTC
Message-ID
<20180724104852.GA14638@sigill.intra.peff.net>

This series is primarily about the first two patches to convert our iconv helpers to use size_t consistently. I posted them to the git-security list a while back, wondering if there was something sneaky you could do here. But after some discussion, the consensus was no, you can't.

The other four patches are just semi-related cleanups I saw while poking around the strbuf code. I doubt any of them fixes a user-visible bug, but I think they're worth doing (and they don't seem to conflict with anything on pu).

  [1/6]: reencode_string: use st_add/st_mult helpers
  [2/6]: reencode_string: use size_t for string lengths
  [3/6]: strbuf: use size_t for length in intermediate variables
  [4/6]: strbuf_readlink: use ssize_t
  [5/6]: pass st.st_size as hint for strbuf_readlink()
  [6/6]: strbuf_humanise: use unsigned variables
 builtin/init-db.c    |  3 ++-
 convert.c            |  6 +++---
 pretty.c             |  2 +-
 refs/files-backend.c |  2 +-
 strbuf.c             | 20 ++++++++++----------
 utf8.c               | 10 +++++-----
 utf8.h               | 10 +++++-----
 7 files changed, 27 insertions(+), 26 deletions(-)
-Peff
Next: Jeff King
Message 1 of 9 in “use size_t in iconv/strbuf”
  1. 0/6 use size_t in iconv/strbufJeff King, Jul 24, 2018
  2. 1/6 reencode_string: use st_add/st_mult helpersJeff King, Jul 24, 2018
  3. 2/6 reencode_string: use size_t for string lengthsJeff King, Jul 24, 2018
  4. 3/6 strbuf: use size_t for length in intermediate variablesJeff King, Jul 24, 2018
  5. 4/6 strbuf_readlink: use ssize_tJeff King, Jul 24, 2018
  6. 5/6 pass st.st_size as hint for strbuf_readlink()Jeff King, Jul 24, 2018
  7. Torsten BögershausenJul 25, 2018
  8. Jeff KingJul 26, 2018
  9. 6/6 strbuf_humanise: use unsigned variablesJeff King, Jul 24, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.