Mercurial > hgrepos > FreeBSD > ports > www > uwsginl
changeset 86:419d764a16b8
plugins/logsocket: always initialize ul->count.
Otherwise in case there's no ul->data we segfault.
Fix #2010
commit d642e635b3d558ce91e80442c74f4d16b9d81146
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Sun, 14 Jun 2020 23:23:47 +0200 |
| parents | 56fc86d83f6f |
| children | |
| files | uwsginl/files/patch-plugins_logsocket_logsocket__plugin.c |
| diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uwsginl/files/patch-plugins_logsocket_logsocket__plugin.c Sun Jun 14 23:23:47 2020 +0200 @@ -0,0 +1,10 @@ +--- plugins/logsocket/logsocket_plugin.c.orig 2020-06-14 21:22:15 UTC ++++ plugins/logsocket/logsocket_plugin.c +@@ -43,6 +43,7 @@ ssize_t uwsgi_socket_logger(struct uwsgi_logger *ul, c + else { + ul->msg.msg_iov = uwsgi_malloc(sizeof(struct iovec)); + ul->msg.msg_iovlen = 1; ++ ul->count = 0; + } + + if (comma) {
