Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C Programming
#include problem
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Nobody, post: 4245857"] Normally, the two should be equal. If they aren't, you have a problem; the choice of which one to take the size of has some effect upon how the problem will manifest. All other factors being equal, reading too much data is typically less problematic than writing too much data. If the last parameter is the size of the object pointed to by the first parameter, memcpy() will always fill the destination exactly (unless it segfaults due to the read). It will probably fill it with garbage, but it won't overwrite some adjacent object. Hopefully this will facilitate identifying the source of the problem sooner rather than later. I.e. you discover that a2 contains garbage, look at what touches a2, you've found the problem. Rather than discovering that z3 contains garbage but finding that nothing which touches z3 looks suspicious. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C Programming
#include problem
Top