Page 1 of 5 12345 LastLast
Results 1 to 10 of 48

Thread: Hmm.. wonder what effect this will have..

  1. #1

    Default Hmm.. wonder what effect this will have..

    Ok form another forum I found this little interesting tidbit:

    Might I add an interesting combination? I'm not sure if it works on Winbeta (EDIT: It does not, sadly.), but it does on 1.1.1 (DOS version).

    Please, make a character and give him any race/class combo and stats you wish, just stop at the "What's your character's name?". There's a very interesting thing with interesting results behind it.

    Press "CTRL+DELETE" - a weird sign should appear. Do it a few more times. Then press backspace a few times; it should erase the ENTIRE thing (along with "What's your character's name?" dialogue.

    Type a really long name that you normally wouldn't be able to type (if it's too long it might crash the game, so don't overdo it; over 12 letters should be fine. If it doesn't do anything special, try a longer name (about 18 letters usually works.). Hit Enter and start out the character.

    Then check out his race and deity. You are now raceless and your Deity slot is blank!
    Could be interesting..

  2. #2
    Join Date
    Aug 2009
    Location
    Canada
    Posts
    1,099

    Default

    I had done some testing on this when I had discovered the bug by accident myself.

    The trick is to do what I call a "non-deleting backspace". That is, hit backspace when there aren't any characters to actually delete. Each time you hit the backspace without deleting something, this actually adds an extra character to the limit you can type. Given that the normal character limit is 12 characters, this means to get a 16 character name, you have to hit backspace 4 times.

    The results of my testing were as follows:

    15 or less characters will operate normally.

    16 character name will change your race to Human. This is done only once you give your PC a name so things like starting stats, skills, experience table and things like that will all be determined by the original race you pick. Things like food consumption, shop prices and deity's favorite items will be changed to human though.

    17-18 character name will result in your race becoming Raceless. I haven't done too much testing on the full effects of this given a few issues that arise. First off, if you 'Q'uit or die, ADOM will crash since it cannot write your character to the highscore table or even if it wasn't eligible to be written to the table, it will crash. It can be successfully saved but on attempting to restore will cause ADOM to crash since it will not be able to read the Race in the .svg to display in the restore game menu. The only way to allow restoring of any characters is to remove the offending .svg files from the folder.

    19-27 character name will result in a similar state as 17-18 but you will not be able to use the 'B'ackground command to verify that you are actually raceless. If you attempt to, it will crash ADOM.

    28 and 29 character names give very odd results. You appear in a dark room map with the related message. 29 character name also gives the arena level messages. There are a very select few commands that can be made in this mode such as checking your inventory. Most other commands such as moving or checking character background will crash the game.

    30+ character names automatically crash the game.

    This is by no means comprehensive testing of the effects of this bug. There are probably quite a few other side effects that result from this and I wasn't about to test every single command to see which could be used with what length of name.
    I said it before, and I'll say it again. If I knew scripture like you, I'd prolly be an athiest too.. -gut

     /l、
    (゚、 。 7  
     l、 ~ヽ   
     じしf_, )ノ

  3. #3
    Join Date
    Jan 2009
    Posts
    5,739

    Default

    16 is certainly exploitable, particularly by trolls for consumption. Or dark elves and orcs for pricing for that matter.

    Very interesting.
    Hoping to win with every class, doomed. Archer, Barbarian, Bard, Beastfighter, Druid, Elementalist, Farmer, Fighter, Monk, and ULE Priest down.

  4. #4

    Default Exploitable..

    Being someone who plays trolls fairly often - I find that exploitation possibility intriguing..

  5. #5
    Join Date
    Aug 2009
    Location
    Canada
    Posts
    1,099

    Default

    I had originally found this bug on a troll barbarian called "Natrl born killa" and only then realised it when I checked my background after puking from eating a rat. The saddest part is you are still stuck with the troll's horrible experience table.

    Last edited by fazisi; 04-05-2010 at 07:44 AM. Reason: Added image
    I said it before, and I'll say it again. If I knew scripture like you, I'd prolly be an athiest too.. -gut

     /l、
    (゚、 。 7  
     l、 ~ヽ   
     じしf_, )ノ

  6. #6
    Join Date
    Dec 2008
    Posts
    1,467

    Default

    I have tried with Sage and it also works. Nice. I started a gray elf with a 16-character name and it appears as a 315-year-old human ("very old"). However I spent some turns fooling around and didn't die of old age (I was hoping to die of old age upon reaching the chain, that would be hilarious... but no :/)

  7. #7

    Default

    This sounds like a simple buffer overrun bug, which usually opens up endless opportunities for exploitation.

    Surely the length of the name is not the only relevant factor. It may seem so if you only use eg. alphabets in the name (a-z, A-Z have relatively large numeric values in ASCII). Sadly the smallest printing character is space, ' ', with decimal value 32... But if you can somehow input non-printing characters into the name, I would think that you could overwrite the race and class and beyond with anything you want. And without the game crashing; it only crashes because race/class (enums, I presume, but not very safe in C) are used as pointers to some table and have too big values.

  8. #8
    Join Date
    Mar 2008
    Location
    London, England
    Posts
    5,014

    Default

    Quote Originally Posted by lotuskip View Post
    This sounds like a simple buffer overrun bug, which usually opens up endless opportunities for exploitation.

    Surely the length of the name is not the only relevant factor. It may seem so if you only use eg. alphabets in the name (a-z, A-Z have relatively large numeric values in ASCII). Sadly the smallest printing character is space, ' ', with decimal value 32... But if you can somehow input non-printing characters into the name, I would think that you could overwrite the race and class and beyond with anything you want. And without the game crashing; it only crashes because race/class (enums, I presume, but not very safe in C) are used as pointers to some table and have too big values.
    Um.... yes, I understood all of that

    Doesn't seem much room for exploitation. Better shop prices as a troll? Greeeat.... Not sure why anyone would want to exploit such an obvious bug anyway, apart from for the obvious reason of weird fun.
    Platinum Edition ADOMer
    http://gamesofgrey.com - check out my roguelikes!

  9. #9

    Default Troll Exploit..

    I was thinking more along the lines for the better food consumption for being a Troll... don't really care much about shop prices as that always becomes moot eventually in any game and Troll XP tables never really bothered me and I do fine with them the way they are.

  10. #10
    Join Date
    Aug 2009
    Location
    Canada
    Posts
    1,099

    Default

    Surely the length of the name is not the only relevant factor. It may seem so if you only use eg. alphabets in the name (a-z, A-Z have relatively large numeric values in ASCII). Sadly the smallest printing character is space, ' ', with decimal value 32... But if you can somehow input non-printing characters into the name, I would think that you could overwrite the race and class and beyond with anything you want. And without the game crashing; it only crashes because race/class (enums, I presume, but not very safe in C) are used as pointers to some table and have too big values.
    Yes, it is definately a buffer overflow problem since it writes the last bytes of the name over the race pointer which comes immediately after the name. I had tried using several different characters as the final character but could only get Human. If your final character is a space, ADOM simply drops it and treats your name as one character shorter. I had tried to input lower non-printing values and even some Unicode characters but those also seemed to get dropped from the name and had no effect.

    If you knew what characters could be used to overwrite the Race portion with good data so it doesn't crash and somehow extend to write over the class data and change your class, this would be cool and lead to even more chance for exploitation (perhaps giving you the skill set of one class but the class powers of another?)
    Last edited by fazisi; 04-05-2010 at 09:57 PM. Reason: QUOTE not CODE
    I said it before, and I'll say it again. If I knew scripture like you, I'd prolly be an athiest too.. -gut

     /l、
    (゚、 。 7  
     l、 ~ヽ   
     じしf_, )ノ

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •