jack_umidi client name too long
Hans Petter Selasky
hps at selasky.org
Thu Jul 5 08:53:08 UTC 2018
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);
More information about the freebsd-multimedia
mailing list