• Jeff King's avatar
    http-walker: store url in a strbuf · 54ba4c5f
    Jeff King authored
    We do an unchecked sprintf directly into our url buffer.
    This doesn't overflow because we know that it was sized for
    "$base/objects/info/http-alternates", and we are writing
    "$base/objects/info/alternates", which must be smaller. But
    that is not immediately obvious to a reader who is looking
    for buffer overflows. Let's switch to a strbuf, so that we
    do not have to think about this issue at all.
    Signed-off-by: default avatarJeff King <peff@peff.net>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
http-walker.c 13.9 KB