1
0
mirror of https://gitlab.gnome.org/GNOME/glib.git synced 2025-07-28 21:03:29 +02:00

tests/tls-certificate: Add context to the new test

Add a comment to `pem_parser_no_sentinel()` to explain what it is
testing and how it works.
This commit is contained in:
Peter Bloomfield
2021-06-05 10:14:24 -04:00
committed by Philip Withnall
parent bdd36797fc
commit afd31d93b5

@@ -220,6 +220,10 @@ pem_parser_no_sentinel (void)
memmove (pem_copy, pem, pem_len);
g_free (pem);
/* Check whether the parser respects the @length parameter.
* pem_copy is allocated exactly pem_len bytes, so accessing memory
* outside its bounds will be detected by, for example, valgrind or
* asan. */
cert = g_tls_certificate_new_from_pem (pem_copy, pem_len, &error);
g_assert_no_error (error);
g_assert_nonnull (cert);