Skip to content

Commit

Permalink
Merge branch 'rg/copy-gecos-username'
Browse files Browse the repository at this point in the history
* rg/copy-gecos-username:
  copy_gecos: fix not adding nlen to len when processing "&"
  • Loading branch information
Junio C Hamano committed May 20, 2011
2 parents 1d699f7 + c0336ff commit ac39c5f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ident.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ static void copy_gecos(const struct passwd *w, char *name, size_t sz)
*dst++ = toupper(*w->pw_name);
memcpy(dst, w->pw_name + 1, nlen - 1);
dst += nlen - 1;
len += nlen;
}
}
if (len < sz)
Expand Down

0 comments on commit ac39c5f

Please sign in to comment.