]> granicus.if.org Git - sudo/commit
Instead of trying to grow the buffer in make_grlist_item(), simply
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 10 Oct 2011 15:10:59 +0000 (11:10 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 10 Oct 2011 15:10:59 +0000 (11:10 -0400)
commita6602fa0e4b059215027bf23f84b9da02b3dfa6f
tree6ab911e61931f797b0b3243e78ccb32ce6ba1526
parentdd3902e115bb6f90cbf41e7884db5f1d2803f5a1
Instead of trying to grow the buffer in make_grlist_item(), simply
increase the total length, free the old buffer and allocate a new
one.  This is less error prone and saves us from having to adjust
all the pointers in the buffer.  This code path is only taken when
there are groups longer than the length of the user field in struct
utmp or utmpx, which should be quite rare.
plugins/sudoers/pwutil.c