| 1 |
Error instead of warn on address truncation. |
| 2 |
|
| 3 |
Forwarded: no |
| 4 |
Author: Chris Taylor <[email protected]> |
| 5 |
--- socat-1.7.2.4.orig/xio-unix.c |
| 6 |
+++ socat-1.7.2.4/xio-unix.c |
| 7 |
@@ -79,7 +79,7 @@ xiosetunix(int pf, |
| 8 |
#ifdef WITH_ABSTRACT_UNIXSOCKET |
| 9 |
if (abstract) { |
| 10 |
if ((pathlen = strlen(path)) >= sizeof(saun->sun_path)) { |
| 11 |
- Warn2("socket address "F_Zu" characters long, truncating to "F_Zu"", |
| 12 |
+ Error2("socket address "F_Zu" characters long, max length is "F_Zu"", |
| 13 |
pathlen+1, sizeof(saun->sun_path)); |
| 14 |
} |
| 15 |
saun->sun_path[0] = '\0'; /* so it's abstract */ |
| 16 |
@@ -98,7 +98,7 @@ xiosetunix(int pf, |
| 17 |
#endif /* WITH_ABSTRACT_UNIXSOCKET */ |
| 18 |
|
| 19 |
if ((pathlen = strlen(path)) > sizeof(saun->sun_path)) { |
| 20 |
- Warn2("unix socket address "F_Zu" characters long, truncating to "F_Zu"", |
| 21 |
+ Error2("unix socket address "F_Zu" characters long, max length is "F_Zu"", |
| 22 |
pathlen, sizeof(saun->sun_path)); |
| 23 |
} |
| 24 |
strncpy(saun->sun_path, path, sizeof(saun->sun_path)); /* ok */ |