Revision 447ac906e189535e77dcb1f4bbe3f1bc917d4c12 authored by Patrick Steinhardt on 01 December 2022, 14:45:31 UTC, committed by Junio C Hamano on 05 December 2022, 06:14:16 UTC
The `struct attr_stack` tracks the stack of all patterns together with
their attributes. When parsing a gitattributes file that has more than
2^31 such patterns though we may trigger multiple out-of-bounds reads on
64 bit platforms. This is because while the `num_matches` variable is an
unsigned integer, we always use a signed integer to iterate over them.

I have not been able to reproduce this issue due to memory constraints
on my systems. But despite the out-of-bounds reads, the worst thing that
can seemingly happen is to call free(3P) with a garbage pointer when
calling `attr_stack_free()`.

Fix this bug by using unsigned integers to iterate over the array. While
this makes the iteration somewhat awkward when iterating in reverse, it
is at least better than knowingly running into an out-of-bounds read.
While at it, convert the call to `ALLOC_GROW` to use `ALLOC_GROW_BY`
instead.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 34ace8b
Raw File
TEAMS
Core Git translation language teams
(please keep the list sorted alphabetically on language field)

Language:	bg (Bulgarian)
Repository:	https://github.com/git-l10n/git-po
Leader:		Alexander Shopov <ash@kambanaria.org>

Language:	ca (Catalan)
Repository:	https://github.com/Softcatala/git-po
Leader:		Jordi Mas <jmas@softcatala.org>
Members:	Alex Henrie <alexhenrie24@gmail.com>

Language:	de (German)
Repository:	https://github.com/ruester/git-po-de
Leader:		Matthias Rüster <matthias.ruester@gmail.com>
Members:	Ralf Thielow <ralf.thielow@gmail.com>
		Phillip Szelat <phillip.szelat@gmail.com>

Language:	el (Greek)
Repository:	https://github.com/vyruss/git-po-el
Leader:		Jimmy Angelakos <vyruss@hellug.gr>

Language:	es (Spanish)
Repository:	https://github.com/ChrisADR/git-po
Leader:		Christopher Díaz <christopher.diaz.riv@gmail.com>

Language:	fr (French)
Repository:	https://github.com/jnavila/git
Leader:		Jean-Noël Avila <jn.avila@free.fr>
Members:	Sébastien Helleu <flashcode@flashtux.org>

Language:	is (Icelandic)
Leader:		Ævar Arnfjörð Bjarmason <avarab@gmail.com>

Language:	it (Italian)
Repository:	https://github.com/AlessandroMenti/git-po
Leader:		Alessandro Menti <alessandro.menti@alessandromenti.it>

Language:	ko (Korean)
Repository:	https://github.com/git-l10n-ko/git-l10n-ko/
Leader:		Gwan-gyeong Mun <elongbug@gmail.com>
Members:	Changwoo Ryu <cwryu@debian.org>
		Sihyeon Jang <uneedsihyeon@gmail.com>

Language:	pl (Polish)
Repository:	https://github.com/Arusekk/git-po
Leader:		Arusekk <arek_koz@o2.pl>

Language:	pt_PT (Portuguese - Portugal)
Repository:	https://github.com/git-l10n-pt-PT/git-po/
Leader:		Daniel Santos <hello@brighterdan.com>

Language:	ru (Russian)
Repository:	https://github.com/DJm00n/git-po-ru/
Leader:		Dimitriy Ryazantcev <DJm00n AT mail.ru>
Members:	insolor <insolor AT gmail.com>

Language:	sv (Swedish)
Repository:	https://github.com/nafmo/git-l10n-sv/
Leader:		Peter Krefting <peter@softwolves.pp.se>

Language:	tr (Turkish)
Repository:	https://github.com/bitigchi/git-po/
Leader:		Emir SARI <bitigchi@me.com>

Language:	vi (Vietnamese)
Repository:	https://github.com/vnwildman/git/
Leader:		Trần Ngọc Quân <vnwildman AT gmail.com>
Members:	Nguyễn Thái Ngọc Duy <pclouds AT gmail.com>

Language:	zh_CN (Simplified Chinese)
Repository:	https://github.com/jiangxin/git/
Leader:		Jiang Xin <worldhello.net AT gmail.com>
Members:	Ray Chen <oldsharp AT gmail.com>
		依云 <lilydjwg AT gmail.com>
		Fangyi Zhou <me AT fangyi.io>

Language:	zh_TW (Traditional Chinese)
Respository:	https://github.com/l10n-tw/git-po
Leader: 	Yi-Jyun Pan <pan93412 AT gmail.com>
Members:	Franklin Weng <franklin AT goodhorse.idv.tw>
back to top