Author: kevlo
Date: Sat Dec 11 08:07:21 2010
New Revision: 216369
URL: http://svn.freebsd.org/changeset/base/216369

Log:
  The use of snprintf() to append to a buffer is not valid according to C99

Modified:
  head/lib/libipsec/ipsec_dump_policy.c

Modified: head/lib/libipsec/ipsec_dump_policy.c
==============================================================================
--- head/lib/libipsec/ipsec_dump_policy.c       Sat Dec 11 00:36:35 2010        
(r216368)
+++ head/lib/libipsec/ipsec_dump_policy.c       Sat Dec 11 08:07:21 2010        
(r216369)
@@ -162,7 +162,8 @@ ipsec_dump_policy(policy, delimiter)
                        return NULL;
                }
                buf = newbuf;
-               snprintf(buf, buflen, "%s%s%s", buf, delimiter, isrbuf);
+               snprintf(buf + strlen(buf), buflen - strlen(buf),
+                   "%s%s", delimiter, isrbuf);
 
                off += xisr->sadb_x_ipsecrequest_len;
        }
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to