projects
/
gssweb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't return pointers to memory held by local std::string buffers
[gssweb.git]
/
json_gssapi
/
test
/
GSSUnwrapTest.cpp
diff --git
a/json_gssapi/test/GSSUnwrapTest.cpp
b/json_gssapi/test/GSSUnwrapTest.cpp
index
de0d9a1
..
1ed079d
100644
(file)
--- a/
json_gssapi/test/GSSUnwrapTest.cpp
+++ b/
json_gssapi/test/GSSUnwrapTest.cpp
@@
-35,10
+35,8
@@
mock_unwrap(
{
/* Error checking */
/* Variables */
{
/* Error checking */
/* Variables */
- std::string buffer;
/* Setup */
/* Setup */
- buffer = MockUnwrap::outputMessageBuffer.toString();
/* Main */
// Copy our input from the appropriate parameters to MockUnwrap
/* Main */
// Copy our input from the appropriate parameters to MockUnwrap
@@
-50,8
+48,7
@@
mock_unwrap(
*minor_status = MockUnwrap::minor_status;
*conf_state = MockUnwrap::conf_state;
*qop_state = MockUnwrap::qop_state;
*minor_status = MockUnwrap::minor_status;
*conf_state = MockUnwrap::conf_state;
*qop_state = MockUnwrap::qop_state;
- output_message_buffer->length = buffer.length();
- output_message_buffer->value = (void *)buffer.c_str();
+ *output_message_buffer = *MockUnwrap::outputMessageBuffer.toGss();
/* Cleanup */
/* return */
/* Cleanup */
/* return */