This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
What's supposed to happen is that __n chars are copied to __buf, followed by '\0'.
My first patch (to insert '\0' at __buf[__n-1]) gives the right answer,It's not only that doesn't prevent the overflow.
but doesn't prevent buffer overflow if strlen(__s) >= __bufsize.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |