[vlc-devel] [patch] Adding AMT module as a network access source. AMT allows IP multicast streams to be tunnelled over a non-multicast enabled network

Wayne BRASSEM wbrassem at rogers.com
Sat Apr 6 01:22:18 CEST 2019


No worries.  I liked the strdup() approach too for that reason.

What happened to MODULES_LIST file in the modules folder?  In my latest git pull it’s gone.  That’s why I didn’t add it to the patch.  I only modified the existing Makefile.am so it was included in the build.

I also spotted a potential issue in the previous BlockUDP routine with respect to packet overflow.  So that’s (hopefully) better in this version too.

I trust that the block_ChainGather() does two things:
	1. Allocates a new, contiguous block of memory for the formerly fragmented one
	2. Releases the memory blocks pointed to by the chained block argument passed in

In my testing it seemed this way it behaves, but I could find no documentation to prove it.
W.

> On Apr 5, 2019, at 2:59 PM, Tristan Matthews <tmatth at videolan.org> wrote:
> 
> On Fri, Apr 5, 2019 at 2:40 PM Wayne Brassem <wbrassem at rogers.com> wrote:
>> 
>> Yeah, I know but strcpy() doesn’t allocate any memory, merely uses the existing buffer.  Anyways in the new patch I standardized on using strdup() which allocates so I know I have to free each time.
> 
> Yeah bad call (twice!) on my part. On the plus I'd still say your new
> patch is better since sys->srcAddr is now exactly sized to hold
> "0.0.0.0", whereas before it was assumed that the destination buffer
> was large enough.
> 
> Best,
> -t
> 
>>> On Apr 5, 2019, at 11:13 AM, Tristan Matthews <tmatth at videolan.org> wrote:
>>> 
>>> On Fri, Apr 5, 2019 at 11:03 AM Wayne Brassem <wbrassem at rogers.com> wrote:
>>>> 
>>>> I’ve checked the code over and can’t see how any of the referenced sys->srcAddr statements below gets leaked.  This buffer is freed in Close(), but is in use until then.
>>>> What am I missing?  I don’t want to resubmit if it’s still wrong.
>>> 
>>> In the previous patch submission, you were overwriting sys->srcAddr
>>> with a strcpy without freeing it first.
>>> The patch you just sent does not have this issue.
>>> 
>>> I'll take a closer look at the latest patch soon.
>>> 
>>> Best,
>>> Tristan
>>> _______________________________________________
>>> vlc-devel mailing list
>>> To unsubscribe or modify your subscription options:
>>> https://mailman.videolan.org/listinfo/vlc-devel
>> 
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel



More information about the vlc-devel mailing list