[Live-devel] (no subject)
Andy Hawkins
Andy.Hawkins at uniguest.com
Thu Nov 30 03:07:20 PST 2023
Hi,
While testing some of my code, I was running through valgrind, and it has picked up the following:
==18855== Conditional jump or move depends on uninitialised value(s)
==18855== at 0x59A7CE4: Groupsock::wasLoopedBackFromUs(UsageEnvironment&, sockaddr_storage const&) (Groupsock.cpp:319)
==18855== by 0x59A7B53: Groupsock::handleRead(unsigned char*, unsigned int, unsigned int&, sockaddr_storage&) (Groupsock.cpp:306)
==18855== by 0x571EB60: RTPInterface::handleRead(unsigned char*, unsigned int, unsigned int&, sockaddr_storage&, int&, unsigned char&, unsigned char&) (in /home/andyh/development/799-rtsp-host/install-sim/usr/lib/libliveMedia.so.111.0.0)
==18855== by 0x5718588: BufferedPacket::fillInData(RTPInterface&, sockaddr_storage&, unsigned char&) (MultiFramedRTPSource.cpp:405)
==18855== by 0x5717DEB: MultiFramedRTPSource::networkReadHandler1() (MultiFramedRTPSource.cpp:241)
==18855== by 0x5717D52: MultiFramedRTPSource::networkReadHandler(MultiFramedRTPSource*, int) (MultiFramedRTPSource.cpp:226)
==18855== by 0x526941C: BasicTaskScheduler::SingleStep(unsigned int) (in /home/andyh/development/799-rtsp-host/install-sim/usr/lib/libBasicUsageEnvironment.so.2.0.4)
==18855== by 0x526858B: BasicTaskScheduler0::doEventLoop(char volatile*) (in /home/andyh/development/799-rtsp-host/install-sim/usr/lib/libBasicUsageEnvironment.so.2.0.4)
==18855== by 0x11CE7D: main (CTRTSPClientServer.cc:105)
==18855== Uninitialised value was created by a stack allocation
==18855== at 0x5717D61: MultiFramedRTPSource::networkReadHandler1() (MultiFramedRTPSource.cpp:229)
==18855==
This seems to be caused by the struct sockaddr_storage 'fromAddress' not being initialised in MultiFramedRTPSource::networkReadHandler1. I changed the definition to:
struct sockaddr_storage fromAddress{0};
and the error goes away.
Thanks
Andy
More information about the live-devel
mailing list