Skip to content

Fix uninitialized value in tls.c / dtls.c#189

Open
Janfred wants to merge 1 commit intoradsecproxy:masterfrom
Janfred:fix/fix-uninitialized-value
Open

Fix uninitialized value in tls.c / dtls.c#189
Janfred wants to merge 1 commit intoradsecproxy:masterfrom
Janfred:fix/fix-uninitialized-value

Conversation

@Janfred
Copy link
Contributor

@Janfred Janfred commented Mar 13, 2026

This PR fixes an uninitialized value in tls.c and dtls.c

In hostport.c the value is used in this statement:
if (hpreturn && *hpreturn)
If called from tlsservernew or dtlsservernew, the value that ends up in hpreturn through the call chain is uninitialized.

Output from valgrid (as example for tls)

<date>: tlsservernew: incoming TLS connection from <ipaddr>
==922433== Thread 26:
==922433== Conditional jump or move depends on uninitialised value(s)
==922433==    at 0x128B6A: _internal_addressmatches (hostport.c:297)
==922433==    by 0x1105AB: find_conf (radsecproxy.c:123)
==922433==    by 0x11BE1D: tlsservernew (tls.c:354)
==922433==    by 0x4E271F4: start_thread (pthread_create.c:442)
==922433==    by 0x4EA6B3F: clone (clone.S:100)
==922433==

Output from valgrid:

```
<date>: tlsservernew: incoming TLS connection from <ipaddr>
==922433== Thread 26:
==922433== Conditional jump or move depends on uninitialised value(s)
==922433==    at 0x128B6A: _internal_addressmatches (hostport.c:297)
==922433==    by 0x1105AB: find_conf (radsecproxy.c:123)
==922433==    by 0x11BE1D: tlsservernew (tls.c:354)
==922433==    by 0x4E271F4: start_thread (pthread_create.c:442)
==922433==    by 0x4EA6B3F: clone (clone.S:100)
==922433==
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant