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.
|