[Home]

Summary:ASTERISK-15269: [patch] app_queue segfaults if realtime field uniqueid is NULL
Reporter:Håkon Nessjøen (haakon)Labels:
Date Opened:2009-12-03 10:47:09.000-0600Date Closed:2010-01-05 09:25:02.000-0600
Priority:CriticalRegression?Yes
Status:Closed/CompleteComponents:Applications/app_queue
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) app_queue.c.patch
( 1) app_queue.c.patch_v2
Description:This patch fixes the issue by notifying the user about the error.

I think this might be the cause of another bug report:
 https://issues.asterisk.org/view.php?id=16037

****** ADDITIONAL INFORMATION ******

In 1.6.0.5 and below, realtime did not care about the uniqueid field in the database. If you upgrade without taking notice of this new change, asterisk could crash unexpectably, if by chance your uniqueid fields are NULL.

This would be a freak accident, but I still think asterisk should segfault because of it.
Comments:By: Håkon Nessjøen (haakon) 2010-01-04 10:25:15.000-0600

Note that \n is missing from the log strings. Should be added before adding to trunk. Sorry

Would love for some karma, even if this is so small patch and you don't use karma anymore :)

By: David Vossel (dvossel) 2010-01-04 10:37:45.000-0600

Haakon, your code looks good, thanks for the contribution! I tweaked a few things I noticed while reviewing it.  Just looking at the code, membername does not need a check.  uniqueid will crash if it was NULL for some reason, but a warning should also be present if it is a zero length string.

By: Digium Subversion (svnbot) 2010-01-04 10:39:12.000-0600

Repository: asterisk
Revision: 237327

U   trunk/apps/app_queue.c

------------------------------------------------------------------------
r237327 | dvossel | 2010-01-04 10:39:12 -0600 (Mon, 04 Jan 2010) | 10 lines

app_queue segfaults if realtime field uniqueid is NULL

(closes issue ASTERISK-15269)
Reported by: haakon
Patches:
     app_queue.c.patch uploaded by haakon (license 880)
     app_queue.c.patch_v2 uploaded by dvossel (license 671)
Tested by: haakon


------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=237327

By: Håkon Nessjøen (haakon) 2010-01-04 10:40:36.000-0600

Typo: "memeber" instead of "member" in new patch

By: Digium Subversion (svnbot) 2010-01-04 10:50:25.000-0600

Repository: asterisk
Revision: 237328

_U  branches/1.6.2/
U   branches/1.6.2/apps/app_queue.c

------------------------------------------------------------------------
r237328 | dvossel | 2010-01-04 10:50:24 -0600 (Mon, 04 Jan 2010) | 16 lines

Merged revisions 237327 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
 r237327 | dvossel | 2010-01-04 10:39:11 -0600 (Mon, 04 Jan 2010) | 10 lines
 
 app_queue segfaults if realtime field uniqueid is NULL
 
 (closes issue ASTERISK-15269)
 Reported by: haakon
 Patches:
       app_queue.c.patch uploaded by haakon (license 880)
       app_queue.c.patch_v2 uploaded by dvossel (license 671)
 Tested by: haakon
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=237328

By: Digium Subversion (svnbot) 2010-01-04 10:51:20.000-0600

Repository: asterisk
Revision: 237329

_U  branches/1.6.1/
U   branches/1.6.1/apps/app_queue.c

------------------------------------------------------------------------
r237329 | dvossel | 2010-01-04 10:51:19 -0600 (Mon, 04 Jan 2010) | 16 lines

Merged revisions 237327 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
 r237327 | dvossel | 2010-01-04 10:39:11 -0600 (Mon, 04 Jan 2010) | 10 lines
 
 app_queue segfaults if realtime field uniqueid is NULL
 
 (closes issue ASTERISK-15269)
 Reported by: haakon
 Patches:
       app_queue.c.patch uploaded by haakon (license 880)
       app_queue.c.patch_v2 uploaded by dvossel (license 671)
 Tested by: haakon
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=237329

By: Digium Subversion (svnbot) 2010-01-04 10:52:03.000-0600

Repository: asterisk
Revision: 237330

_U  branches/1.6.0/

------------------------------------------------------------------------
r237330 | dvossel | 2010-01-04 10:52:03 -0600 (Mon, 04 Jan 2010) | 15 lines

Blocked revisions 237327 via svnmerge

........
 r237327 | dvossel | 2010-01-04 10:39:11 -0600 (Mon, 04 Jan 2010) | 10 lines
 
 app_queue segfaults if realtime field uniqueid is NULL
 
 (closes issue ASTERISK-15269)
 Reported by: haakon
 Patches:
       app_queue.c.patch uploaded by haakon (license 880)
       app_queue.c.patch_v2 uploaded by dvossel (license 671)
 Tested by: haakon
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=237330