Ethereal 0.99.0 epan/strutil.c - utf_8to16 bug
Joe Hagen <[email protected]>
| Newsgroups | gmane.network.ethereal.devel |
|---|---|
| Message-ID | <[email protected]> |
I believe the utf_8to16 function in epan/strutil.c has a bug. I've experienced access violations with version 0.99.0 when starting a capture that point to this function. I performed tests using Windows XP SP2 and used the gflags program to enable page heap checking on ethereal.exe. The fault actually occurs in the Win32 function MultiByteToWideChar, but occurs because this code: utf16buf[idx] = g_realloc(utf16buf[idx], utf16buf_len[idx]); doesn't account for the sizeof(wchar_t) when allocating memory, resulting in an access violation. The buffer passed to MultiByteToWideChar is too small. Joe Hagen