[Live-devel] Error in ByteStreamMultiFileSource.cpp

Joshua Hitchen Josh at metrosecurity.co.uk
Thu Feb 1 10:26:14 PST 2018


In the constructor for the ByteStreamMultiFileSource, to determine the number of sources you iterate fNumSources until the value pointed to by  fileNameArray[fNumSources] is NULL, but there is no guarantee that the stored value after the pointer to the final file name pointer in the array will be null. This leads to access violations.

Here is my proposed method to replace the current implementation:
fNumSources = sizeof(fileNameArray);

Input File Names:
File Index 0: test 0.ext
File Index 1: test 1.ext
File Index 2: test 2.ext
File Index 3: test 3.ext
Actual number of files: 4
My Method result: 4
ByteStreamMultiFileSource.cpp Method's result: 9
Regards

Josh Hitchen


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20180201/64725d19/attachment.html>


More information about the live-devel mailing list