|
-
June 4th, 2012, 09:38 PM
#13
Re: Using this XOR encryption in C++
You are calling strlen(NULL) in your function if NULL is the first argument. There is no guarantee how strlen() behaves if a NULL is passed, as strlen() doesn't check for NULL pointers. All strlen() does is start at the address you give it, and search for a '\0' character.
A NULL address is not the same thing as a '\0' character.
Regards,
Paul McKenzie
But my first argument will not be NULL, so I dont see the problem in this.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|