@@ -160,28 +160,28 @@ Admin_options_to_c (Handle *self, rd_kafka_admin_op_t for_api,
160
160
if (Admin_options_is_set_int (options -> require_stable_offsets ) &&
161
161
(err_obj = rd_kafka_AdminOptions_set_require_stable_offsets (
162
162
c_options , options -> require_stable_offsets ))) {
163
- strcpy (errstr , rd_kafka_error_string (err_obj ));
163
+ snprintf (errstr , sizeof ( errstr ), "%s" , rd_kafka_error_string (err_obj ));
164
164
goto err ;
165
165
}
166
166
167
167
if (Admin_options_is_set_int (options -> include_authorized_operations ) &&
168
168
(err_obj = rd_kafka_AdminOptions_set_include_authorized_operations (
169
169
c_options , options -> include_authorized_operations ))) {
170
- strcpy (errstr , rd_kafka_error_string (err_obj ));
170
+ snprintf (errstr , sizeof ( errstr ), "%s" , rd_kafka_error_string (err_obj ));
171
171
goto err ;
172
172
}
173
173
174
174
if (Admin_options_is_set_int ((int )options -> isolation_level ) &&
175
175
(err_obj = rd_kafka_AdminOptions_set_isolation_level (
176
176
c_options ,options -> isolation_level ))) {
177
- strcpy (errstr , rd_kafka_error_string (err_obj ));
177
+ snprintf (errstr , sizeof ( errstr ), "%s" , rd_kafka_error_string (err_obj ));
178
178
goto err ;
179
179
}
180
180
181
181
if (Admin_options_is_set_ptr (options -> states ) &&
182
182
(err_obj = rd_kafka_AdminOptions_set_match_consumer_group_states (
183
183
c_options , options -> states , options -> states_cnt ))) {
184
- strcpy (errstr , rd_kafka_error_string (err_obj ));
184
+ snprintf (errstr , sizeof ( errstr ), "%s" , rd_kafka_error_string (err_obj ));
185
185
goto err ;
186
186
}
187
187
0 commit comments