flat assembler
Message board for the users of flat assembler.

Index > Windows > more questions

Author
Thread Post new topic Reply to topic
spacebuddy



Joined: 26 Aug 2009
Posts: 5
spacebuddy 30 Aug 2009, 03:31
Since I am learning assembler I have more questions. I have this code
which is suppose to append text on a variable.

Source db "",0

invoke lstrcpy, Source,"Item1"
invoke lstrcat,Source,Source

Not sure why this is not working, Source should equal "Item1Item1"

Rolling Eyes
Post 30 Aug 2009, 03:31
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20451
Location: In your JS exploiting you and your system
revolution 30 Aug 2009, 03:56
There are at least two thing to realise here.

1) Your "source" buffer is too small and you risk overwriting something else that follows it.
2) lstrcat is not a clever function. It may not work the way you expect above when your source and destination are the same. You have to check exactly how the functions operates to see what happens in this situation.
Post 30 Aug 2009, 03:56
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.