summaryrefslogtreecommitdiff
path: root/chat/micq/patches/patch-ad
blob: ec798279762308be1b8ee7af87e0f1cbb03f7c2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
$NetBSD: patch-ad,v 1.1 2001/01/31 19:10:12 tron Exp $

--- util_ui.c.orig	Tue Jan 23 17:49:05 2001
+++ util_ui.c	Wed Jan 31 20:07:47 2001
@@ -102,7 +102,7 @@
    assert( 2048 >= strlen( str ) );
    
    va_start( args, str );
-   vsprintf( buf, str, args );
+   vsnprintf( buf, sizeof(buf), str, args );
    k = write( fd, buf, strlen( buf ) );
    if ( k != strlen( buf ) )
    {
@@ -292,7 +292,7 @@
    
    va_start( args, str );
 #ifndef CURSES_UI
-   vsprintf( buf, str, args );
+   vsnprintf( buf, sizeof(buf), str, args );
    str2 = buf;
    while ( (void *) NULL != ( str1 = strchr( str2, '\x1b' ) ) )
    {
@@ -423,19 +423,6 @@
    thetime=localtime(&p);
 
    M_print( "%.02d:%.02d:%.02d",thetime->tm_hour,thetime->tm_min,thetime->tm_sec );
-}
-
-static void remove_tab( int index )
-{
-   int j;
-
-   if ( tab_array[ index ] != NULL ) {
-	free( tab_array[ index ] );
-   }
-   for ( j=index; j+1<TAB_SLOTS; j++ ) {
-	tab_array[ j ] = tab_array[ j+1 ];
-   }
-   tab_array[ TAB_SLOTS ] = NULL;
 }
 
 void add_tab( DWORD uin )