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
Mega Newbie pointer question
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="Chris Torek, post: 2479287"] I think your guess is wrong :-) I think this is not the problem. (I believe that TIFFGetField does its own malloc() and sets *vpp to the result.) Depending on which version of libtiff one has, the "count" provided via &count here must be a "uint32". Probably the code is writing 32 bits' worth of data into a 16-bit container, and clobbering some unrelated variable in the process. Perhaps equally importantly, in the original code, "Beginner" went on to use strcat() with inappropriate parameters. In particular, the target buffer for strcat() is not necessarily initially empty, and the source values are not necessarily strings (and certainly have not had their data-types converted correctly). (While the "count" filled in is a count of 4-byte values, it is not really clear what those values are, given the documentation.) [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C Programming
Mega Newbie pointer question
Top