summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixSock.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-03-07 20:09:30 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-03-07 20:09:30 (GMT)
commit0e0d74624b670cf813951e61b3025182d9d0398b (patch)
treea6e6b52ac4ea6377f05993da2a9cef335d886b78 /unix/tclUnixSock.c
parent82acd6a35a2efe65efe21a1ee63710ee8a7af8ce (diff)
parent5e095a3a4d445694e0a618ed20fe92d8fd34b637 (diff)
downloadtcl-0e0d74624b670cf813951e61b3025182d9d0398b.zip
tcl-0e0d74624b670cf813951e61b3025182d9d0398b.tar.gz
tcl-0e0d74624b670cf813951e61b3025182d9d0398b.tar.bz2
Fix [b4af93cd9f]: uninitialized bytes in http11-1.13.0
Diffstat (limited to 'unix/tclUnixSock.c')
-rw-r--r--unix/tclUnixSock.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c
index 70dfc61..0be10ad 100644
--- a/unix/tclUnixSock.c
+++ b/unix/tclUnixSock.c
@@ -1033,10 +1033,10 @@ TcpGetOptionProc(
if ((len == 0) || ((len > 1) && (optionName[1] == 'k') &&
(strncmp(optionName, "-keepalive", len) == 0))) {
+ int opt = 0;
#if defined(SO_KEEPALIVE)
- socklen_t size;
+ socklen_t size = sizeof(opt);
#endif
- int opt = 0;
if (len == 0) {
Tcl_DStringAppendElement(dsPtr, "-keepalive");
@@ -1053,10 +1053,10 @@ TcpGetOptionProc(
if ((len == 0) || ((len > 1) && (optionName[1] == 'n') &&
(strncmp(optionName, "-nodelay", len) == 0))) {
+ int opt = 0;
#if defined(SOL_TCP) && defined(TCP_NODELAY)
- socklen_t size;
+ socklen_t size = sizeof(opt);
#endif
- int opt = 0;
if (len == 0) {
Tcl_DStringAppendElement(dsPtr, "-nodelay");