17 lines
567 B
Plaintext
17 lines
567 B
Plaintext
$OpenBSD: patch-conf_c,v 1.2 2004/10/21 14:48:51 naddy Exp $
|
|
--- conf.c.orig Fri Sep 24 05:42:32 2004
|
|
+++ conf.c Thu Oct 14 15:43:33 2004
|
|
@@ -130,9 +130,10 @@ conf_t *conf_load( int argc, char *argv[
|
|
|
|
if( conf->configdir[strlen(conf->configdir)-1] != '/' )
|
|
{
|
|
- char *s = bitlbee_alloc( strlen( conf->configdir ) + 2 );
|
|
+ size_t s_len = strlen( conf->configdir ) + 2 ;
|
|
+ char *s = bitlbee_alloc( s_len );
|
|
|
|
- sprintf( s, "%s/", conf->configdir );
|
|
+ g_snprintf( s, s_len, "%s/", conf->configdir );
|
|
g_free( conf->configdir );
|
|
conf->configdir = s;
|
|
}
|