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
/
GSSGetMicTest.cpp
diff --git
a/json_gssapi/test/GSSGetMicTest.cpp
b/json_gssapi/test/GSSGetMicTest.cpp
index
1273761
..
cb50fff
100644
(file)
--- a/
json_gssapi/test/GSSGetMicTest.cpp
+++ b/
json_gssapi/test/GSSGetMicTest.cpp
@@
-31,10
+31,8
@@
mock_get_mic(
{
/* Error checking */
/* Variables */
{
/* Error checking */
/* Variables */
- std::string buffer;
/* Setup */
/* Setup */
- buffer = MockGetMic::outputToken.toString();
/* Main */
// Copy our input from the appropriate parameters to MockGetMic
/* Main */
// Copy our input from the appropriate parameters to MockGetMic
@@
-45,8
+43,7
@@
mock_get_mic(
// copy our output to the appropriate parameters
*minor_status = MockGetMic::minor_status;
// copy our output to the appropriate parameters
*minor_status = MockGetMic::minor_status;
- message_token->length = buffer.length();
- message_token->value = (void *)buffer.c_str();
+ *message_token = *MockGetMic::outputToken.toGss();
/* Cleanup */
/* return */
/* Cleanup */
/* return */