Skip to content

Commit

Permalink
Change from sprintf to snprintf in test_classifier.
Browse files Browse the repository at this point in the history
  • Loading branch information
mittinatten committed Sep 11, 2023
1 parent 98690ef commit 5eda2e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_classifier.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ START_TEST(test_class)
ck_assert(a.class == UNK);
continue;
}
sprintf(buf, "Classification error for %s %s %s %s",
snprintf(buf, sizeof buf, "Classification error for %s %s %s %s",
a.a, a.b, freesasa_classifier_class2str(c),
freesasa_classifier_class2str(a.class));
ck_assert_msg(c == a.class, buf);
Expand Down

0 comments on commit 5eda2e0

Please sign in to comment.