Date: Thu, 5 Jul 2018 10:52:46 +0200 From: Hans Petter Selasky <hps@selasky.org> To: =?UTF-8?Q?Goran_Meki=c4=87?= <meka@tilda.center> Cc: freebsd-multimedia@freebsd.org Subject: Re: jack_umidi client name too long Message-ID: <96c1b29f-fa12-0fb5-95f5-18b37e8f09a4@selasky.org> In-Reply-To: <d07851f3-09ba-7445-f6f8-760d5920c4b2@selasky.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> <d07851f3-09ba-7445-f6f8-760d5920c4b2@selasky.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?96c1b29f-fa12-0fb5-95f5-18b37e8f09a4>