Description of problem:
get_event_name uses sprintf to fill a buffer declared on the stack. It fills the buffer 2 bytes at a time. What the code doesn't take into account is that sprintf(buf, "%02x", data) actually writes 3 bytes. 2 bytes for the data and then it nul terminates the string. Since we declare buf to be 40 characters long and then we write 40 bytes of data into buf sprintf is going to write 41 characters. The fix is to leave room in buf for the nul terminator.
Applied to MRG 1.1
Verified by code review against the 22.214.171.124-126 source tree. Found upstream commit fbaa58696cef848de818768783ef185bd3f05158 as mrg-rt.git commit 90bbc7f6612e50ae31a0f8b01f34ac66adda2857 (CVS: bz503902_get_event_name_stack_corruption.patch).
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.