#1077199 tclcurl fails when option -writeproc receives a non trivial procedure name

Package:
tclcurl
Source:
tclcurl
Description:
Tcl bindings to libcurl
Submitter:
Massimo Manghi
Date:
2024-07-26 16:33:03 UTC
Severity:
normal
Tags:
#1077199#5
Date:
2024-07-26 16:22:00 UTC
From:
To:
Dear Maintainer,

tclcurl fails with a segmentation fault when option -writeproc is given a not trivial
name or a wrong procedure name. Even though the reason of the segmentation fault (which
prevents ordinary error handling) lies deeper in the Tcl library nonetheless TclCurl
segfalts also when attempting to use valid object methods as callbacks.

Interally the tclcurl treats them as single words that are non existing commands,
which eventually brings about the segfault

Notice that the function implementing the -readproc option is similarly structured and
probably would fail likewise under the same conditions.

I can provide a reimplementation of function curlWriteProcInvoke that seems to fix the problem