Merged requested to merge alanc/xev:patch into master
nmbbytes value is the length we need the buffer to be, but
the current size is only
bsize. We can't store a NUL at
realloc, so only do this when the buffer is sized properly.
Signed-off-by: Mikael Magnusson <firstname.lastname@example.org> [email@example.com: Moved string termination out of the loop] Signed-off-by: Ismael Luceno <firstname.lastname@example.org> Signed-off-by: Alan Coopersmith <email@example.com>