Skip to content
  • Jeff King's avatar
    mailmap: replace strcpy with xstrdup · c978610d
    Jeff King authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    We want to make a copy of a string without any leading
    whitespace. To do so, we allocate a buffer large enough to
    hold the original, skip past the whitespace, then copy that.
    It's much simpler to just allocate after we've skipped, in
    which case we can just copy the remainder of the string,
    leaving no question of whether "len" is large enough.
    
    Signed-off-by: default avatarJeff King <peff@peff.net>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    c978610d