silc heap corruption
"Brian Reed" <[email protected]> Tue, 4 Dec 2007 11:49:34 -0800
| Newsgroups | gmane.network.silc.devel |
|---|---|
| Message-ID | <[email protected]> |
Silc Developers, Thank you in advance for addressing this issue. I am writing a silc messenging program with a gui, and am using the silc toolkit 1.1.5 with Visual Studios 2005 and C++ My program crashed when I left a channel that had been in founder mode and had no users but me in it with the following exception. HEAP[Application.exe] Invalid Address specified to RtlValidateHeap(04740000, 04755778 ) Windows has triggered a breakpoint in MessageCenter.exe. This may be due to a corruption of the heap, and indicates a bug in MessageCenter.exe or any of the DLLs it has loaded. The output window may have more diagnostic information I rebuilt the silc toolkit in debug and set the log_debug to true and found that the silc client code was trying to free the pointer to the channel name. For this particular exception, the pointer to the channel name was at 0x4755798, which seems to be outside of the bounds of the heap. In order to test some more, I modified the code in client_entry.c, line 1639, so that I could call silc_free(channel->channel_name); and then set the name again, to see if it would crash, which it did. It seems as though the channel = silc_calloc(1, sizeof(*channel)); call is either not allocating enough memory, or the channel_name is not being copied into the memory that has been allocated in line 1638, channel->channel_name = strdup(name); Since we believe this problem may be within the silc toolkit, I thought you might be able to help me figure this out. Thank you again for any help you might be able to give, Brian Reed _______________________________________________________________________ Info: https://lists.silcnet.org/mailman/listinfo/silc-announce Archive: https://lists.silcnet.org/pipermail/silc-announce FAQ: http://silcnet.org/support/faq/