mirror of https://github.com/sipwise/rtpengine.git
`vsnprintf()` returns the number of bytes that would have been written, not the number actually stored in label. If a formatted label gets longer than 127 bytes, then the lablen becomes larger than the `sizeof(label)`, and then `iov[0].iov_len = lablen;` makes the `writev()` read past the stack buffer. Similarly for the `infix`, but here the overflow should be less risky. Also improve logging for the cases of unexpected written size, or even a failure of the `writev()`. Change-Id: I1a36ee262bec03c24b582219bc4d5babde685ed8pull/2138/head
parent
3662e25020
commit
be70cb4168
Loading…
Reference in new issue