diff options
author | Simon Josefsson <simon@josefsson.org> | 2004-10-05 19:23:32 +0000 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2004-10-05 19:23:32 +0000 |
commit | 44f36671ed0ea24b60afdf8a033faf3d258a24c3 (patch) | |
tree | e69dca84aa9ed595fc218bb536091f2112b875f9 /lib/x509_b64.c | |
parent | c959c9d135876d62dc00f743c27f23cb4b30f74c (diff) | |
download | gnutls-44f36671ed0ea24b60afdf8a033faf3d258a24c3.tar.gz |
Update Gnulib.
Replace memstr with memmem, see continued discussion on bug-gnulib.
Diffstat (limited to 'lib/x509_b64.c')
-rw-r--r-- | lib/x509_b64.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/x509_b64.c b/lib/x509_b64.c index 3a5f06140f..2c20602391 100644 --- a/lib/x509_b64.c +++ b/lib/x509_b64.c @@ -413,7 +413,7 @@ int _gnutls_fbase64_decode(const char *header, const opaque * data, if (header != NULL) _gnutls_str_cat(pem_header, sizeof(pem_header), header); - rdata = memstr(data, pem_header, data_size); + rdata = memmem(data, data_size, pem_header, strlen (pem_header)); if (rdata == NULL) { gnutls_assert(); @@ -428,11 +428,11 @@ int _gnutls_fbase64_decode(const char *header, const opaque * data, return GNUTLS_E_BASE64_DECODING_ERROR; } - kdata = memstr(rdata, ENDSTR, data_size); + kdata = memmem(rdata, data_size, ENDSTR, sizeof (ENDSTR) - 1); /* allow CR as well. */ if (kdata == NULL) - kdata = memstr(rdata, ENDSTR2, data_size); + kdata = memmem(rdata, data_size, ENDSTR2, sizeof (ENDSTR2) - 1); if (kdata == NULL) { gnutls_assert(); @@ -446,7 +446,7 @@ int _gnutls_fbase64_decode(const char *header, const opaque * data, /* position is now after the ---BEGIN--- headers */ - kdata = memstr(rdata, bottom, data_size); + kdata = memmem(rdata, data_size, bottom, strlen (bottom)); if (kdata == NULL) { gnutls_assert(); return GNUTLS_E_BASE64_DECODING_ERROR; |