Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
Users Online
CommonCrawl, Bing, Yandex, DotBot, Google

Members: 0
Guests: 16
Stats
Files
Topics
Posts
Members
Newest Member
481
3,739
19,386
619
Alexander
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Bugfix Lists » SmaugFUSS Bugfix List » [Bug] Attempt to close a NULL...
Forum Rules | Mark all | Recent Posts

[Bug] Attempt to close a NULL file
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Sep 15, 2005, 7:25 am
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,643
JoinedJan 1, 2002

Bug: Attempt to close a NULL file
Danger: Medium - Undefined behaviour
Found by: Remcon
Fixed by: Remcon

---

db.c, save_sysdata

Locate:
      fprintf( fp, "IdentTries     %d\n", sys.ident_retries );
      fprintf( fp, "Pkloot	     %d\n", sys.pk_loot );
      fprintf( fp, "End\n\n" );
      fprintf( fp, "#END\n" );
   }
   fclose( fp );
   return;
}


Change to:
      fprintf( fp, "IdentTries     %d\n", sys.ident_retries );
      fprintf( fp, "Pkloot	     %d\n", sys.pk_loot );
      fprintf( fp, "End\n\n" );
      fprintf( fp, "#END\n" );
      fclose( fp );
      fp = NULL;
   }
   return;
}


The classic attempt to close a NULL file. Behaviour is undefined and on some systems this will crash.
       
Pages:<< prev 1 next >>