git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 0/3] a few config integer parsing fixes
@ 2022-10-21 13:45 Phillip Wood via GitGitGadget
  2022-10-21 13:45 ` [PATCH 1/3] git_parse_unsigned: reject negative values Phillip Wood via GitGitGadget
                   ` (3 more replies)
  0 siblings, 4 replies; 27+ messages in thread
From: Phillip Wood via GitGitGadget @ 2022-10-21 13:45 UTC (permalink / raw)
  To: git; +Cc: René Scharfe, Phillip Wood

This series fixes some issues I noticed when reading the integer parsing
code in config.c

 * git_parse_unsigned() does not reject negative values
 * git_parse_[un]signed() accept a units specifier without any digits
 * git_parse_signed() has in integer overflow when parsing MAXINT_MIN

Ideally we'd have a test tool to unit test functions like this, I haven't
found time to write that yet. cc'ing René for patch 3 as he was the last
person to touch that code.

Phillip Wood (3):
  git_parse_unsigned: reject negative values
  config: require at least one digit when parsing numbers
  git_parse_signed(): avoid integer overflow

 config.c | 24 +++++++++++++++++++-----
 1 file changed, 19 insertions(+), 5 deletions(-)


base-commit: e85701b4af5b7c2a9f3a1b07858703318dce365d
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1389%2Fphillipwood%2Fconfig-integer-parsing-fixes-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1389/phillipwood/config-integer-parsing-fixes-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1389
-- 
gitgitgadget

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2022-11-10  2:35 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-21 13:45 [PATCH 0/3] a few config integer parsing fixes Phillip Wood via GitGitGadget
2022-10-21 13:45 ` [PATCH 1/3] git_parse_unsigned: reject negative values Phillip Wood via GitGitGadget
2022-10-21 18:09   ` Junio C Hamano
2022-10-21 20:13   ` Jeff King
2022-10-22 17:54     ` Junio C Hamano
2022-10-21 13:45 ` [PATCH 2/3] config: require at least one digit when parsing numbers Phillip Wood via GitGitGadget
2022-10-21 18:19   ` Junio C Hamano
2022-10-25  9:54     ` Phillip Wood
2022-10-25 16:08       ` Junio C Hamano
2022-10-21 20:17   ` Jeff King
2022-10-22 17:51     ` Junio C Hamano
2022-10-22 20:25       ` Jeff King
2022-10-22 21:00         ` Junio C Hamano
2022-10-25  9:55     ` Phillip Wood
2022-10-21 13:45 ` [PATCH 3/3] git_parse_signed(): avoid integer overflow Phillip Wood via GitGitGadget
2022-10-21 18:31   ` Junio C Hamano
2022-10-22  8:09     ` René Scharfe
2022-10-22 16:51       ` Junio C Hamano
2022-10-23  5:57         ` René Scharfe
2022-10-25 10:00           ` Phillip Wood
2022-10-26 11:01             ` René Scharfe
2022-11-09 14:16 ` [PATCH v2 0/3] a few config integer parsing fixes Phillip Wood via GitGitGadget
2022-11-09 14:16   ` [PATCH v2 1/3] git_parse_unsigned: reject negative values Phillip Wood via GitGitGadget
2022-11-09 15:57     ` Ævar Arnfjörð Bjarmason
2022-11-09 14:16   ` [PATCH v2 2/3] config: require at least one digit when parsing numbers Phillip Wood via GitGitGadget
2022-11-09 14:16   ` [PATCH v2 3/3] git_parse_signed(): avoid integer overflow Phillip Wood via GitGitGadget
2022-11-10  2:35   ` [PATCH v2 0/3] a few config integer parsing fixes Taylor Blau

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).