Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 72260
Collapse All | Expand All

(-)bitlbee-0.91/bitlbee.c (-4 / +10 lines)
Lines 285-290 Link Here
285
	account_t *a;
285
	account_t *a;
286
	FILE *fp;
286
	FILE *fp;
287
	char *hash;
287
	char *hash;
288
	int retval;
288
	
289
	
289
	/*\
290
	/*\
290
	 *  [SH] Nothing should be saved if no password is set, because the
291
	 *  [SH] Nothing should be saved if no password is set, because the
Lines 344-354 Link Here
344
	g_snprintf( path, 511, "%s%s%s", global.conf->configdir, irc->nick, ".accounts~" );
345
	g_snprintf( path, 511, "%s%s%s", global.conf->configdir, irc->nick, ".accounts~" );
345
	fp = fopen( path, "w" );
346
	fp = fopen( path, "w" );
346
	if( !fp ) return( 0 );
347
	if( !fp ) return( 0 );
347
	if( fprintf( fp, "%s", hash ) != strlen( hash ) )
348
	retval = fprintf( fp, "%s", hash );
349
	if( retval != strlen( hash ) )
348
	{
350
	{
349
		irc_usermsg( irc, "fprintf() wrote too little. Disk full?" );
351
		if( retval == 1) {
350
		fclose( fp );
352
			irc_usermsg( irc, "Enabling writing hack for gentoo. This is dangerous and may corrupt your files.");
351
		return( 0 );
353
		} else {
354
			irc_usermsg( irc, "fprintf() wrote too little. Disk full?" );
355
			fclose( fp );
356
			return( 0 );
357
		}
352
	}
358
	}
353
	g_free( hash );
359
	g_free( hash );
354
360

Return to bug 72260