Overview
| Artifact ID: | aa30ce6426854c2ca1b9d74b5fb4783fda4ccd78 |
|---|---|
| Ticket: | 999544ffffffffffffffffffffffffffffffffff
Threaded Tcl calls non-thread-safe library functions |
| User & Date: | vasiljevic on 2006-09-07 23:01:09 |
Changes
- icomment:
Logged In: YES user_id=95086 Well, it says in the code: /* *---------------------------------------------------------------- ----------- * * CopyArray -- * * Copies array of NULL-terminated or fixed-length strings * to the private buffer, honouring the size of the buffer. * * Results: * Number of bytes copied on success or -1 on error (errno = ERANGE) * * Side effects: * None. * *---------------------------------------------------------------- ----------- */ This is basically copying the src[0] .... src[n] to a user-passed buffer. The buffer stores the copy of the array and following it the strings referenced by the array. I look and still do not see the problem. There is one assigment there len = (sizeof(char *)*(i + 1)); /* Leave place for the array */ new = (char **)buf; But this should be innocent really... - login: "vasiljevic"
- mimetype: "text/plain"
- username: "vasiljevic"