[libss7-commits] rmudgett: branch 1.0 r291 - /branches/1.0/isup.c

SVN commits to the libss7 project libss7-commits at lists.digium.com
Fri Sep 16 12:34:46 CDT 2011


Author: rmudgett
Date: Fri Sep 16 12:34:45 2011
New Revision: 291

URL: http://svnview.digium.com/svn/libss7?view=rev&rev=291
Log:
Fix some uninitialized values reported by valgrind.

Initialize the local isup_call structure in isup_send_cicgroupmessage(),
isup_cqr(), isup_grs(), isup_gra(), and isup_send_message_ciconly().

(issue ASTERISK-17966)
Reported by: Kenneth Van Velthoven
Patches:
      jira_asterisk_17966_libss7_v1.0_init.patch (license #5621) patch uploaded by rmudgett

Modified:
    branches/1.0/isup.c

Modified: branches/1.0/isup.c
URL: http://svnview.digium.com/svn/libss7/branches/1.0/isup.c?view=diff&rev=291&r1=290&r2=291
==============================================================================
--- branches/1.0/isup.c (original)
+++ branches/1.0/isup.c Fri Sep 16 12:34:45 2011
@@ -3120,7 +3120,7 @@
 
 static int isup_send_cicgroupmessage(struct ss7 *ss7, int messagetype, int begincic, int endcic, unsigned int dpc, unsigned char status[], int type)
 {
-	struct isup_call call;
+	struct isup_call call = {{0},};
 	int i;
 
 	for (i = 0; (i + begincic) <= endcic; i++)
@@ -3139,7 +3139,7 @@
 
 int isup_cqr(struct ss7 *ss7, int begincic, int endcic, unsigned int dpc, unsigned char status[])
 {
-	struct isup_call call;
+	struct isup_call call = {{0},};
 	int i;
 
 	for (i = 0; (i + begincic) <= endcic; i++)
@@ -3157,7 +3157,7 @@
 
 int isup_grs(struct ss7 *ss7, int begincic, int endcic, unsigned int dpc)
 {
-	struct isup_call call;
+	struct isup_call call = {{0},};
 
 	if (!ss7)
 		return -1;
@@ -3174,7 +3174,7 @@
 
 int isup_gra(struct ss7 *ss7, int begincic, int endcic, unsigned int dpc)
 {
-	struct isup_call call;
+	struct isup_call call = {{0},};
 
 	if (!ss7)
 		return -1;
@@ -3304,7 +3304,8 @@
 static int isup_send_message_ciconly(struct ss7 *ss7, int messagetype, int cic, unsigned int dpc)
 {
 	int res;
-	struct isup_call c;
+	struct isup_call c = {{0},};
+
 	c.cic = cic;
 	c.dpc = dpc;
 	res = isup_send_message(ss7, &c, messagetype, empty_params);




More information about the libss7-commits mailing list