summaryrefslogtreecommitdiff
path: root/x11/xmx/patches/patch-de
blob: d9c1990d40451876acb0ecf7d7b95d7aa0cc7380 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
$NetBSD: patch-de,v 1.1 2008/08/31 06:52:29 dholland Exp $

--- server/time.c~	1998-03-31 14:12:31.000000000 -0500
+++ server/time.c	2008-08-31 02:23:31.000000000 -0400
@@ -30,6 +30,8 @@
 #ifdef _AIX
 #include <sys/select.h>
 #endif
+#include <stdio.h>
+#include <stdlib.h>
 #include "xmx.h"
 #include "fd.h"
 #include "incl/time.pvt.h"
@@ -232,6 +234,6 @@ time_str
 
    cp = &buf[cur++][0];
    cur %= 6;
-   sprintf(cp, "%u/%u", tp->mo, tp->ms);  /* cannot exceed 24 in length */
+   snprintf(cp, 24, "%u/%u", tp->mo, tp->ms);  /* cannot exceed 24 in length */
    return cp;
 }