diff options
author | NIIBE Yutaka <[email protected]> | 2024-07-01 02:52:25 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2024-07-01 02:52:25 +0000 |
commit | ec2c6dd8bc49e010810cb8ad403a9b8dad5d399e (patch) | |
tree | b94ba94317c0d998b5f9381b0a64ade9ed6d3413 /src/data-identify.c | |
parent | cpp: Remove obsolete files (diff) | |
download | gpgme-ec2c6dd8bc49e010810cb8ad403a9b8dad5d399e.tar.gz gpgme-ec2c6dd8bc49e010810cb8ad403a9b8dad5d399e.zip |
Use gpgrt_b64dec in libgpg-error.
* src/b64dec.c: Remove.
* src/Makefile.am (main_sources): Remove b64dec.c.
* src/data-identify.c (pgp_binary_detection): Use gpgrt_b64dec in
libgpg-error.
--
gpgrt_b64dec is available in libgpg-error 1.27 and it is already in
use by JSON support.
GnuPG-bug-id: 7180
Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to '')
-rw-r--r-- | src/data-identify.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/data-identify.c b/src/data-identify.c index 6d2500d9..561ba498 100644 --- a/src/data-identify.c +++ b/src/data-identify.c @@ -283,18 +283,18 @@ pgp_binary_detection (const void *image_arg, size_t imagelen) static gpgme_data_type_t inspect_pgp_message (char *string) { - struct b64state state; + gpgrt_b64state_t state; size_t nbytes; - if (_gpgme_b64dec_start (&state, "")) + if (!(state = gpgrt_b64dec_start (""))) return GPGME_DATA_TYPE_INVALID; /* oops */ - if (_gpgme_b64dec_proc (&state, string, strlen (string), &nbytes)) + if (gpgrt_b64dec_proc (state, string, strlen (string), &nbytes)) { - _gpgme_b64dec_finish (&state); + gpgrt_b64dec_finish (state); return GPGME_DATA_TYPE_UNKNOWN; /* bad encoding etc. */ } - _gpgme_b64dec_finish (&state); + gpgrt_b64dec_finish (state); string[nbytes] = 0; /* Better append a Nul. */ return pgp_binary_detection (string, nbytes); |