[svn-commits] branch 1.2 - r270 /branches/1.2/q931.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Wed Nov 30 20:34:44 CST 2005


Author: mattf
Date: Wed Nov 30 20:34:44 2005
New Revision: 270

URL: http://svn.digium.com/view/libpri?rev=270&view=rev
Log:
Backport of fix from trunk.  Fix broken single digit keypad facility code.

Modified:
    branches/1.2/q931.c

Modified: branches/1.2/q931.c
URL: http://svn.digium.com/view/libpri/branches/1.2/q931.c?rev=270&r1=269&r2=270&view=diff
==============================================================================
--- branches/1.2/q931.c (original)
+++ branches/1.2/q931.c Wed Nov 30 20:34:44 2005
@@ -1382,12 +1382,14 @@
 	if (ie->len == 0)
 		return -1;
 
-	if (ie->len > sizeof(call->digitbuf))
-		mylen = sizeof(call->digitbuf);
+	if (ie->len > (sizeof(call->digitbuf) - 1))
+		mylen = (sizeof(call->digitbuf) - 1);
 	else
 		mylen = ie->len;
 
-	libpri_copy_string(call->digitbuf, (char *) ie->data, mylen);
+	memcpy(call->digitbuf, ie->data, mylen);
+
+	call->digitbuf[mylen] = 0;
 
 	return 0;
 }



More information about the svn-commits mailing list