diff options
author | Martin Schanzenbach <schanzen@gnunet.org> | 2022-12-08 20:51:35 +0900 |
---|---|---|
committer | Martin Schanzenbach <schanzen@gnunet.org> | 2022-12-08 20:51:35 +0900 |
commit | 7768a7a75ee959b53cf7a7acdfa0a8c7b17de99e (patch) | |
tree | aaabeaa4b8e8a0afe82d8d7538d271525105da48 /src/dhtu | |
parent | dccf4142eaac44711692c295d81e0103c8042cd2 (diff) | |
download | gnunet-7768a7a75ee959b53cf7a7acdfa0a8c7b17de99e.tar.gz gnunet-7768a7a75ee959b53cf7a7acdfa0a8c7b17de99e.zip |
TESTING: Sanitize API. Add new GNUNET_TESTING_command_new API
This commit changes the label member of GNUNET_TRANSPORT_Command to a
static, fixed length buffer allocated with the struct itself.
The check for the end of a command array should be done by checking the
run command instead of the label.
Diffstat (limited to 'src/dhtu')
-rw-r--r-- | src/dhtu/testing_dhtu_cmd_send.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dhtu/testing_dhtu_cmd_send.c b/src/dhtu/testing_dhtu_cmd_send.c index fe8e1c18a..45d166b14 100644 --- a/src/dhtu/testing_dhtu_cmd_send.c +++ b/src/dhtu/testing_dhtu_cmd_send.c | |||
@@ -107,12 +107,12 @@ GNUNET_TESTING_DHTU_cmd_send (const char *label) | |||
107 | { | 107 | { |
108 | struct GNUNET_TESTING_Command cmd = { | 108 | struct GNUNET_TESTING_Command cmd = { |
109 | .cls = ss, | 109 | .cls = ss, |
110 | .label = label, | ||
111 | .run = &send_run, | 110 | .run = &send_run, |
112 | .ac = &ss->ac, | 111 | .ac = &ss->ac, |
113 | .cleanup = &send_cleanup, | 112 | .cleanup = &send_cleanup, |
114 | .traits = &send_traits | 113 | .traits = &send_traits |
115 | }; | 114 | }; |
115 | strncpy (cmd.label, label, GNUNET_TESTING_CMD_MAX_LABEL_LENGTH); | ||
116 | 116 | ||
117 | return cmd; | 117 | return cmd; |
118 | } | 118 | } |