ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/contrib/vprintf_fix.patch
Revision: 30
Committed: Sun Oct 2 20:03:27 2005 UTC (20 years, 10 months ago) by adx
Content type: text/x-diff
File size: 709 byte(s)
Log Message:
- imported sources
- can be moved later according to the directory/branching scheme,
  but we need the svn up

File Contents

# User Rev Content
1 adx 30 /* $Id: vprintf_fix.patch,v 1.2 2005/08/15 08:00:48 metalrock Exp $ */
2     --- src/send.c Wed Aug 3 22:37:59 2005
3     +++ src/send.c Mon Aug 15 00:57:15 2005
4     @@ -65,6 +65,7 @@
5     send_format(char *lsendbuf, int bufsize, const char *pattern, va_list args)
6     {
7     int len;
8     + va_list args_copy;
9    
10     /*
11     * from rfc1459
12     @@ -78,7 +79,10 @@
13     * continuation message lines. See section 7 for more details about
14     * current implementations.
15     */
16     - len = vsnprintf(lsendbuf, bufsize - 1, pattern, args);
17     +
18     + va_copy(args_copy, args);
19     + len = vsnprintf(lsendbuf, bufsize - 1, pattern, args_copy);
20     + va_end(args_copy);
21     if (len > bufsize - 2)
22     len = bufsize - 2; /* required by some versions of vsnprintf */

Properties

Name Value
svn:eol-style native
svn:keywords "Id Revision"