From cae5f92ba8be4da36b4d870a7db9ed929b2f1745 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 22 Jul 2016 17:13:35 +0200 Subject: Fix bug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/libcoopgamma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/libcoopgamma.c b/src/libcoopgamma.c index 3421798..345909f 100644 --- a/src/libcoopgamma.c +++ b/src/libcoopgamma.c @@ -1289,7 +1289,7 @@ char* libcoopgamma_get_socket_file(const char* restrict method, const char* rest return NULL; p = strchr(raw, '\0') - 1; - if (*p != '\n') + if ((p < raw) || (*p != '\n')) { errno = EBADMSG; goto fail; -- cgit v1.2.3-70-g09d2