[svn-commits] mmichelson: trunk r267 - /trunk/mtp2.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Tue Jul 7 16:17:28 CDT 2009
Author: mmichelson
Date: Tue Jul 7 16:17:23 2009
New Revision: 267
URL: http://svn.asterisk.org/svn-view/libss7?view=rev&rev=267
Log:
Don't write past the end of the buffer. It's bad.
(closes issue #14676)
Reported by: Safari
Modified:
trunk/mtp2.c
Modified: trunk/mtp2.c
URL: http://svn.asterisk.org/svn-view/libss7/trunk/mtp2.c?view=diff&rev=267&r1=266&r2=267
==============================================================================
--- trunk/mtp2.c (original)
+++ trunk/mtp2.c Tue Jul 7 16:17:23 2009
@@ -786,8 +786,7 @@
reset_mtp(new);
- strncpy(new->name, name, sizeof(new->name));
- new->name[sizeof(new->name)] = 0;
+ strncpy(new->name, name, sizeof(new->name) - 1);
new->fd = -1;
new->autotxsutype = LSSU_SIOS;
More information about the svn-commits
mailing list