Skip to content

Commit d2ef340

Browse files
committed
test BUGFIX fixed-size string copy
1 parent 8870f71 commit d2ef340

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_ch.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ test_msg_callback(const struct nc_session *session, NC_VERB_LEVEL level, const c
4949
(void) session;
5050

5151
if (strstr(msg, expected)) {
52-
strcpy(buffer, msg);
52+
strncpy(buffer, msg, 511);
5353
}
5454

5555
printf("%s\n", msg);

0 commit comments

Comments
 (0)