From owner-freebsd-multimedia@freebsd.org Thu Jul 5 08:53:08 2018 Return-Path: Delivered-To: freebsd-multimedia@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0CB6810359F7 for ; Thu, 5 Jul 2018 08:53:08 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9EE067096E for ; Thu, 5 Jul 2018 08:53:07 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.128.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id DA7D826032A; Thu, 5 Jul 2018 10:53:05 +0200 (CEST) Subject: Re: jack_umidi client name too long From: Hans Petter Selasky To: =?UTF-8?Q?Goran_Meki=c4=87?= Cc: freebsd-multimedia@freebsd.org References: <20180614224209.huk5nusli4m5ngqn@hal9000.cicici.home> <2cd19236-1475-e374-9427-27dfdfc7ca2c@ShaneWare.Biz> <20180615084612.e6af43xzxx4nmypj@hal9000.cicici.home> <2a838efe-7954-4f39-323e-603135e48cc6@ShaneWare.Biz> <20180616171340.oyuyj4r25ehih3xc@thinker.my.domain> <53dbe3eb-4cef-bb84-1502-e69d8816bfef@selasky.org> <20180617101158.c7xx7gigtnz2xx2s@hal9000.cicici.home> <144fd724-ff71-7b30-a71a-5a370e391ca6@selasky.org> Message-ID: <96c1b29f-fa12-0fb5-95f5-18b37e8f09a4@selasky.org> Date: Thu, 5 Jul 2018 10:52:46 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2018 08:53:08 -0000 On 07/05/18 10:35, Hans Petter Selasky wrote: > On 06/17/18 12:33, Hans Petter Selasky wrote: >> On 06/17/18 12:11, Goran Mekić wrote: >>> On Sun, Jun 17, 2018 at 11:56:12AM +0200, Hans Petter Selasky wrote: >>>> Maybe the name length can be stripped down? >>>> >>>> --HPS >>> >>> Maybe, but how? I though -n option will do that, but I get the same >>> error. >>> >> >> Have a look at the source code. I think the current buffer is bigger >> than the limit! > > Can you make an issue here for your problem and I'll have a look at it > later on: > https://github.com/hselasky/jack_umidi > Can you try this patch: Index: jack_umidi.c =================================================================== --- jack_umidi.c (revision 4048) +++ jack_umidi.c (working copy) @@ -651,6 +651,11 @@ size = ptr - devname; *ptr = 0; } + /* limit the string length */ + if (strlen(devname) > 16) { + devname[16] = 0; + size = 16; + } /* append port number */ snprintf(devname + size, sizeof(devname) - size, " #%d", subunit);