1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-12-04 14:46:30 -05:00

Fix: Allow client=NULL in util_http_build_header()

This fixes a bug in 8941de3273:
When passing NULL as client parameter to util_http_build_header()
there was a segfault before this change.
This commit is contained in:
Philipp Schafft 2015-02-02 01:08:37 +00:00
parent 19162018f4
commit a18e2540fb

View File

@ -711,7 +711,7 @@ ssize_t util_http_build_header(char * out, size_t len, ssize_t offset,
status_buffer,
config->server_id,
connection_header,
(client->admin_command == ADMIN_COMMAND_ERROR ?
(client && client->admin_command == ADMIN_COMMAND_ERROR ?
"GET, SOURCE" : "GET"),
(config->tls_ok ? "Upgrade: TLS/1.0\r\n" : ""),
currenttime_buffer,