| Ticket Hash: | 6599c152fd732301e31ace28e4f7a01bccad93d2 | ||
| Title: | udp_open and udp_conf error reporting | ||
| Status: | Closed | Type: | Code_Defect |
| Severity: | Severe | Priority: | Immediate |
| Subsystem: | Resolution: | Fixed | |
| Last Modified: |
2026-07-05 22:00:57 103.5 days ago |
Created: |
2019-04-24 23:42:11 7.48 years ago |
| Version Found In: | 1.0.11 | ||
| User Comments: | ||||
anonymous added on 2019-04-24 23:42:11:
The udpOpen function has two problems when reporting errors. The first is a simple typo:
char errmsg[] = "upd_open [remoteport] [ipv6] [reuse]";
It should read "udp_open".
The second problem is more serious. The call to Tcl_SetResult is:
Tcl_SetResult (interp, errmsg, NULL);
The last argument should read TCL_VOLATILE, since the error string is allocated on the stack. The value of NULL is equivalent to TCL_STATIC. This could cause a segmentation fault.
The udpConf function also contains a call to Tcl_SetResult with a NULL argument.
bohagan added on 2026-07-05 22:00:57:
This was fixed in commit [91c7bfc73154c97d]. | ||||