diff -Nru ocserv-0.12.2/debian/changelog ocserv-0.12.2/debian/changelog --- ocserv-0.12.2/debian/changelog 2019-02-21 04:09:36.000000000 +0800 +++ ocserv-0.12.2/debian/changelog 2019-04-13 15:00:59.000000000 +0800 @@ -1,3 +1,10 @@ +ocserv (0.12.2-3) unstable; urgency=medium + + * d/patches: fix ocserv-worker segfault + - 0003-Fix-the-bug-of-ocserv-worker-segfault-at-0-ip-b76d67.patch + + -- Aron Xu Sat, 13 Apr 2019 15:00:59 +0800 + ocserv (0.12.2-2) unstable; urgency=medium * d/patches: upstream patch for AC-DTLS12 and stability with diff -Nru ocserv-0.12.2/debian/patches/0003-Fix-the-bug-of-ocserv-worker-segfault-at-0-ip-b76d67.patch ocserv-0.12.2/debian/patches/0003-Fix-the-bug-of-ocserv-worker-segfault-at-0-ip-b76d67.patch --- ocserv-0.12.2/debian/patches/0003-Fix-the-bug-of-ocserv-worker-segfault-at-0-ip-b76d67.patch 1970-01-01 08:00:00.000000000 +0800 +++ ocserv-0.12.2/debian/patches/0003-Fix-the-bug-of-ocserv-worker-segfault-at-0-ip-b76d67.patch 2019-04-13 14:59:10.000000000 +0800 @@ -0,0 +1,32 @@ +From d3cb2e8f53eb36ae007c6dd5cfa6a8455d741b5e Mon Sep 17 00:00:00 2001 +From: Frank Huang +Date: Sun, 17 Feb 2019 08:12:42 +0000 +Subject: [PATCH 09/15] Fix the bug of "ocserv-worker: segfault at 0 ip + b76d6747 sp bf851c70", https://gitlab.com/openconnect/ocserv/issues/197 + +It must be some caller does not add extra size for null at the end + +Signed-off-by: Frank Huang +--- + src/str.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/str.c b/src/str.c +index c95c54f6..91d955bf 100644 +--- a/src/str.c ++++ b/src/str.c +@@ -103,9 +103,9 @@ int str_append_size(str_st * dest, size_t data_size) + */ + int str_append_data(str_st * dest, const void *data, size_t data_size) + { +-int ret; ++ int ret; + +- ret = str_append_size(dest, data_size); ++ ret = str_append_size(dest, data_size+1); + if (ret < 0) + return ret; + +-- +2.11.0 + diff -Nru ocserv-0.12.2/debian/patches/series ocserv-0.12.2/debian/patches/series --- ocserv-0.12.2/debian/patches/series 2019-02-21 04:08:03.000000000 +0800 +++ ocserv-0.12.2/debian/patches/series 2019-04-13 15:00:41.000000000 +0800 @@ -1,3 +1,4 @@ legacy_pidfile.patch 0001-worker-allow-negotiating-AC-DTLS12-with-openconnect.patch 0002-worker-added-safety-check-for-selected-DTLS-ciphersu.patch +0003-Fix-the-bug-of-ocserv-worker-segfault-at-0-ip-b76d67.patch