[Live-devel] Segmentation fault in DelayQueue::removeEntry(DelayQueueEntry*)

Francisco Feijoo francisco at j2kvideo.com
Fri Nov 4 05:43:54 PDT 2011


Hello,

We have developed a RTSP client using live555. 

#0  0x006f253d in DelayQueue::removeEntry(DelayQueueEntry*) () from /usr/lib/libvideosource.so.1
#1  0x006f2c4f in DelayQueue::handleAlarm() () from /usr/lib/libvideosource.so.1
#2  0x006f1f70 in BasicTaskScheduler::SingleStep(unsigned int) () from /usr/lib/libvideosource.so.1
#3  0x006f3920 in BasicTaskScheduler0::doEventLoop(char*) () from /usr/lib/libvideosource.so.1


Looking at the code here http://www.live555.com/liveMedia/doxygen/html/DelayQueue_8cpp-source.html I see this:

00153 void DelayQueue::removeEntry(DelayQueueEntry* entry) {
00154   if (entry == NULL || entry->fNext == NULL) return;
00155   
00156   entry->fNext->fDeltaTimeRemaining += entry->fDeltaTimeRemaining;
00157   entry->fPrev->fNext = entry->fNext;
00158   entry->fNext->fPrev = entry->fPrev;
00159   entry->fNext = entry->fPrev = NULL;
00160   // in case we should try to remove it again
00161 }

I think the first if could produce a wrong memory access if entry is NULL. Is that correct?

Thanks in advance.
-- 
Francisco Feijoo
Software Engineer
J2K Video Limited

T: +44 020 8133 9388
E: francisco at j2kvideo.com
W: www.j2kvideo.com

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


More information about the live-devel mailing list