Overview
| Artifact ID: | cf94059fd500490ada0925dd829481d308331b40 |
|---|---|
| Ticket: | 2494093fffffffffffffffffffffffffffffffff
buffer overflow in AppendUnicodeToUnicode() -> SEGFAULT |
| User & Date: | matzek on 2009-01-15 16:03:58 |
Changes
- icomment:
From a mail I sent to the tcl-core list: I want to give two points to your attention that concern me with the fix of this bug. But first thank you very much for helping to find the problem and then fixing it promptly! 1) The fix as now implemented restricts the content of variables to INT_MAX/4 which is 512MB! To my mind this is comparatively small and should be documented somewhere. Please notice that this is also half the size, of what was possible in 8.4.19 / 8.5.6. 2) In tclStringObj.c is a lengthy documentation of the memory allocation algorithm for strings. This is now obsolete in the case when more than INT_MAX/4 memory is free and could be allocated. As in this case we panic() before even coming to the attemptckalloc(). What you should make with this information? Well, I don't know. I just wanted to make sure it doesn't get lost and someone has to learn it the hard way. I can live with the fix now. Where is the use case that needs so much memory? Consider vfs::memchan. This is where I stumbled over the issue. I thought I use vfs::memchan to be able to transparently uncompress and evaluate the crc of archives...
- login: "matzek"
- mimetype: "text/plain"
- username: "matzek"