Tcl UDP

Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: f1c5289d8ff48b39ad966fe50d0a893114b6ea042cd2b4ce511dfc77c75f451d
Ticket: 6599c152fd732301e31ace28e4f7a01bccad93d2
udp_open and udp_conf error reporting
User & Date: anonymous 2019-04-24 23:42:11
Changes

  1. foundin changed to: "1.0.11"
  2. icomment:
    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.
    
  3. login: "anonymous"
  4. mimetype: "text/x-fossil-plain"
  5. private_contact changed to: "1c57e67924247fd7926e89348f266c081ec57db2"
  6. severity changed to: "Severe"
  7. status changed to: "Open"
  8. title changed to: "udp_open and udp_conf error reporting"
  9. type changed to: "Code_Defect"