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, DotBot, Yandex

Members: 0
Guests: 10
Stats
Files
Topics
Posts
Members
Newest Member
481
3,735
19,370
618
Micheal64X
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Bugfix Lists » AFKMud Bugfix List » AFKMud Bug Archive » [Bug] strip_crlf function has...
Forum Rules | Mark all | Recent Posts

[Bug] strip_crlf function has no protection against NULL strings
< Newer Topic :: Older Topic > AFKMud 1.76a

Pages:<< prev 1 next >>
Post is unread #1 Nov 9, 2005, 10:42 am   Last edited Jan 22, 2006, 6:40 pm by Samson
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,643
JoinedJan 1, 2002

Bug: strip_crlf function has no protection against NULL strings
Discovered in: AFKMud 1.76a
Danger: High - Crash bug in isolated instances
Found by: Samson
Fixed by: Samson

---

act_info.c, strip_crlf

Locate:
   static char newstr[MSL];
   int i, j;


Change to:
   static char newstr[MSL];
   int i, j;

   if( !str || str[0] == '\0' )
      return "";


This fix, much like the strip_cr fix before it, will prevent null strings from crashing the game. The strip_crlf function is not used in any data file saving currently so there is no danger in corrupting a file with this.
       
Pages:<< prev 1 next >>