1
0
Fork 0
mirror of https://repo.or.cz/socat.git synced 2025-07-14 15:23:24 +00:00

AddressSanitizer reported a few buffer overflows (false positives)

This commit is contained in:
Gerhard Rieger 2017-01-06 17:56:30 +01:00
parent 40d9352599
commit e25ba90e21
4 changed files with 15 additions and 8 deletions

View file

@ -252,9 +252,9 @@ int _xioopen_foxec(int xioflags, /* XIO_RDONLY etc. */
/* AIX: I_PUSH def'd; pty: ioctl(, I_FIND, ...) -> 1 */
/* SunOS: I_PUSH def'd; pty: ioctl(, I_FIND, ...) -> 0 */
/* HP-UX: I_PUSH def'd; pty: ioctl(, I_FIND, ...) -> 0 */
if (Ioctl(ttyfd, I_FIND, "ldterm") == 0) {
Ioctl(ttyfd, I_PUSH, "ptem"); /* 0 */
Ioctl(ttyfd, I_PUSH, "ldterm"); /* 0 */
if (Ioctl(ttyfd, I_FIND, "ldterm\0") == 0) {
Ioctl(ttyfd, I_PUSH, "ptem\0\0\0"); /* 0 */ /* padding for AdressSanitizer */
Ioctl(ttyfd, I_PUSH, "ldterm\0"); /* 0 */
Ioctl(ttyfd, I_PUSH, "ttcompat"); /* HP-UX: -1 */
}
#endif