]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
lib/b64dec: Use grub_size_t instead of size_t for _gpgrt_b64dec_proc() function defin... master
authorAnaëlle Cazuc <acazuc@acazuc.fr>
Tue, 2 Sep 2025 10:26:44 +0000 (12:26 +0200)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 9 Sep 2025 23:12:17 +0000 (01:12 +0200)
On some targets, size_t and grub_size_t may not be the same type
(unsigned long / unsigned int). This breaks the compilation because the
definition of _gpgrt_b64dec_proc() differs from gpgrt_b64dec_proc()
declaration. Fix it by using grub_size_t in the _gpgrt_b64dec_proc()
definition.

Signed-off-by: Anaëlle Cazuc <acazuc@acazuc.fr>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/lib/b64dec.c

index 868d985685bb4f8712447ee923a0fab0668b5ed5..769cabda441ef4bf9fd18bab152d5e320b8f2d53 100644 (file)
@@ -100,8 +100,8 @@ _gpgrt_b64dec_start (const char *title)
 /* Do in-place decoding of base-64 data of LENGTH in BUFFER.  Stores the
    new length of the buffer at R_NBYTES. */
 gpg_err_code_t
-_gpgrt_b64dec_proc (gpgrt_b64state_t state, void *buffer, size_t length,
-                    size_t *r_nbytes)
+_gpgrt_b64dec_proc (gpgrt_b64state_t state, void *buffer, grub_size_t length,
+                    grub_size_t *r_nbytes)
 {
   enum decoder_states ds = state->idx;
   unsigned char val = state->radbuf[0];