Summary: | ASTERISK-13411: utils/refcounter segfaults due to reference of count1_obj when its NULL | ||
Reporter: | James Golovich (jamesgolovich) | Labels: | |
Date Opened: | 2009-01-20 14:46:58.000-0600 | Date Closed: | 2009-01-21 11:43:36.000-0600 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Utilities/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | I'm not sure if this happens to everyone or just something unique in my situation. First time I've played with refcounter. Line 164 prints an error if count1_obj doesn't exist but then tries to reference count1_obj->addr which is a guaranteed segfault. Not sure what the appropriate action is here, in my copy I just removed the reference so the error message is just printed. - printf("BAD: object %x appears without previous allocation marker!\n", count1_obj->addr); + printf("BAD: object appears without previous allocation marker!\n"); | ||
Comments: | By: Sean Bright (seanbright) 2009-01-21 09:11:14.000-0600 What about just changing: count1_obj->addr to: un By: Digium Subversion (svnbot) 2009-01-21 11:21:21.000-0600 Repository: asterisk Revision: 169673 U trunk/utils/refcounter.c ------------------------------------------------------------------------ r169673 | murf | 2009-01-21 11:21:21 -0600 (Wed, 21 Jan 2009) | 14 lines This patch corrects a segfault reported in 14289, due to a null ptr being refd. Yes, seanbright is right in the bug comments, that is the fix. Sorry for this oversight; I guess my personal usage didn't have this happen! murf (closes issue ASTERISK-13411) Reported by: jamesgolovich ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=169673 By: Digium Subversion (svnbot) 2009-01-21 11:39:48.000-0600 Repository: asterisk Revision: 169674 _U branches/1.6.1/ U branches/1.6.1/utils/refcounter.c ------------------------------------------------------------------------ r169674 | murf | 2009-01-21 11:39:47 -0600 (Wed, 21 Jan 2009) | 19 lines Merged revisions 169673 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r169673 | murf | 2009-01-21 10:21:40 -0700 (Wed, 21 Jan 2009) | 14 lines This patch corrects a segfault reported in 14289, due to a null ptr being refd. Yes, seanbright is right in the bug comments, that is the fix. Sorry for this oversight; I guess my personal usage didn't have this happen! murf (closes issue ASTERISK-13411) Reported by: jamesgolovich ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=169674 By: Digium Subversion (svnbot) 2009-01-21 11:43:35.000-0600 Repository: asterisk Revision: 169675 _U branches/1.6.0/ ------------------------------------------------------------------------ r169675 | murf | 2009-01-21 11:43:35 -0600 (Wed, 21 Jan 2009) | 18 lines Blocked revisions 169673 via svnmerge ........ r169673 | murf | 2009-01-21 10:21:40 -0700 (Wed, 21 Jan 2009) | 14 lines This patch corrects a segfault reported in 14289, due to a null ptr being refd. Yes, seanbright is right in the bug comments, that is the fix. Sorry for this oversight; I guess my personal usage didn't have this happen! murf (closes issue ASTERISK-13411) Reported by: jamesgolovich ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=169675 |