Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Users Online
CommonCrawl, Google, Sogou, Yahoo!

Members: 0
Guests: 9
Stats
Files
Topics
Posts
Members
Newest Member
477
3,706
19,240
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SmaugFUSS » "File security issues in mult...
Forum Rules | Mark all | Recent Posts

"File security issues in multiple modules" ISSUES?
< Newer Topic :: Older Topic > This fix seems to have bugs

Pages:<< prev 1 next >>
Post is unread #1 Aug 7, 2006, 11:36 am   Last edited Aug 7, 2006, 1:10 pm by mordecai
Go to the top of the page
Go to the bottom of the page

mordecai

GroupMembers
Posts99
JoinedNov 17, 2005

First I find
if( !is_valid_filename( ch, DEITY_DIR, argument );
return;

which isn't too bad, so I just fix it.

      STRFREE( clan->filename );
      clan->filename = STRALLOC( argument );

should stay:
      DISPOSE( clan->filename );
      clan->filename = str_dup( argument );



      if( !( race = create_new_race( MAX_PC_RACE, arg1 ) ) )

should stay:
      if( ( create_new_race( MAX_PC_RACE, arg1 ) ) == FALSE )


      write_race_file( race );

should stay
      write_race_file( ra );



      write_race_file( ra );

should change to
      write_race_file( MAX_PC_RACE );

       
Post is unread #2 Aug 7, 2006, 11:55 am   Last edited Aug 7, 2006, 1:19 pm by mordecai
Go to the top of the page
Go to the bottom of the page

mordecai

GroupMembers
Posts99
JoinedNov 17, 2005

Doesn't
   if( !str_cmp( arg2, "create" ) && Class )
   {
      send_to_char( "That class already exists!\r\n", ch );
      return;
   }

(and the equivalent for races)
seem redundant, since we're already checking pre-existent files (and files are in one-to-one correspondence with the class names)
       
Post is unread #3 Aug 7, 2006, 1:13 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,866
JoinedJul 26, 2005

This looks correct
      if( !is_valid_filename( ch, DEITY_DIR, argument );
         return;

Problem with that is what exactly?
You are correct on
      STRFREE( clan->filename );
      clan->filename = STRALLOC( argument );

should be
      DISPOSE( clan->filename );
      clan->filename = str_dup( argument );

You are also right about the race changes (Thats my fault I at some point changed it in mine and it didn't get back ported correctly).
       
Post is unread #4 Aug 7, 2006, 1:21 pm
Go to the top of the page
Go to the bottom of the page

mordecai

GroupMembers
Posts99
JoinedNov 17, 2005

Two things wrong with the first line, Rem. First, there's no closing parenthesis. Second, the if is useless b/c of the semicolon; the real intention here was to group it w/return so it will return only in that case.
       
Post is unread #5 Aug 7, 2006, 2:58 pm   Last edited Aug 7, 2006, 3:54 pm by Remcon
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,866
JoinedJul 26, 2005

Lol very very true, see how easy it is for someone to over look something :)
Btw, when I looked at it and said it looks fine, well i only compared the stuff in the if check not the start of the ending of the if check itself :)
On the bright side I checked to see if it was my fault (meaning my post on it on my forums had the same problem), and it didn't :)
Later...
       
Post is unread #6 Aug 7, 2006, 7:13 pm
Go to the top of the page
Go to the bottom of the page

GatewaySysop
Conjurer
GroupMembers
Posts367
JoinedMar 7, 2005

Hmm. I patched this in based off what was on Remcon's site and then updated it to match parts that Samson changed in his post. I did find that I had the same issue with using ra vs. race and some of the others, but I assumed that my FUSS was simply out-dated and that something had changed in later revisions. Glad to see that my MUD isn't quite that removed just yet. :cyclops:

       
Post is unread #7 Aug 7, 2006, 8:17 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

And now people know why I said to take the fix slow, carefully, and be sure they had plenty of time and weren't half-asleep. I should have taken my own advice and scrutinized it more carefully. But hey, only a few small blunders. You should have seen how much I did catch in transferring the fixes :)

Anyway. The bugfix post for this has been edited to reflect the proper contents and the package updated.
       
Post is unread #8 Aug 7, 2006, 8:58 pm
Go to the top of the page
Go to the bottom of the page

mordecai

GroupMembers
Posts99
JoinedNov 17, 2005

I am curious as to everyone's thoughts on the redundant code for checking pre-existent classes and races. I originally brought this up in my first reply, and was hoping to get some response here.
       
Post is unread #9 Aug 8, 2006, 3:07 am
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,866
JoinedJul 26, 2005

The reason I had started changeing some of the race stuff over was to have it handle a change better, lol at some point i found a different way of handling the change when it came to classes and never have changed the races part back lol. I don't doubt that who ever worked on porting the changes back had one crazy of a time doing so lol. Good job on getting them done :)
       
Post is unread #10 Aug 8, 2006, 3:23 am   Last edited Aug 8, 2006, 3:26 am by Remcon
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,866
JoinedJul 26, 2005

And with that I changed the race handlers back to a more stock way of handling, to make it easier on others who need to back port any changes in the future dealing with races although with any luck there wont be a need for more changes to races.

And to answer your question mordecai, it should be fine to do that change also.
       
Post is unread #11 Aug 8, 2006, 6:53 am
Go to the top of the page
Go to the bottom of the page

mordecai

GroupMembers
Posts99
JoinedNov 17, 2005

The change of....getting rid of the redundant checking code before the standard check function?
       
Post is unread #12 Aug 8, 2006, 7:14 am
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,866
JoinedJul 26, 2005


      write_race_file( ra );

should change to
      write_race_file( MAX_PC_RACE );


That one.
At least I don't see any reason it wouldn't work that way. (Although as it has been proven I as well as anyone can easily overlook something.) :)
       
Post is unread #13 Aug 8, 2006, 7:41 am
Go to the top of the page
Go to the bottom of the page

mordecai

GroupMembers
Posts99
JoinedNov 17, 2005

Oh, I see. I thought you were referring to my request for ideas about the redundant code - since Samson had already applied my changes to the patch post and codebase.

MAX_PC_RACE is the current actual number of races loaded in the race array (the array size is the theoretical limit, that is set in mud.h). So when creating a new race, it should place it on the end of the array. The index of the end, happens to also be the size (b/c of 0 indexing). ra is the race number for editing, but it is found by finding a matching race....since creating a new race means one doesn't exist yet, I don't think that would work. Also, the other places in the race code were using MAX_PC_RACE - so even if they both worked somehow, it would be inconsistent.
       
Pages:<< prev 1 next >>