2009/1/16 Andrew Rechenberg Lists <flux...@resurgent.com>: >> > >> > I've got the NTLM code returning a Base 64 encoded auth challenge > but >> > when I try to run my gssapi char * variable through > msg_header_format >> > the actual value of the variable is being modified/overwritten >> somehow. >> >> Interesting... Can you run your code under valgrind? Sounds like a >> fandango en core problem... >> > > I don't believe so. I'm using Apple XCode's integrated interface to GDB > to step through my code (the code has a .ar of the sofia code compiled > in and I'm using the iPhone simulator to run my code. > > I'm modified my code so that the pointer isn't getting overwritten now > by memcpy'ing the data into the ar struct, however I still am only > getting part of the gssapi-data. The amount of data alloc'd for the > Authorization header is well short of what is needed and I only get 4 > bytes in the portion of the header I set aside for it (the > gssapi-data="%s" portion. The %s only has 4 character in it).
The idea is to try to print header in a small buffer, and if it does not fit, allocate bigger one. If snprintf() works (and why it should not??), there should be no overflow. > I have to be doing something wrong, but I have no idea what. :( What the snprintf() returns on the first round, what is the value it returns? -- Pekka.Pessi mail at nokia.com ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel