]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[base64] Include terminating NUL within base64 character array
authorMichael Brown <mcb30@ipxe.org>
Mon, 7 Jun 2021 12:18:19 +0000 (13:18 +0100)
committerMichael Brown <mcb30@ipxe.org>
Mon, 7 Jun 2021 12:20:02 +0000 (13:20 +0100)
Reported-by: Bernhard M. Wiedemann <bwiedemann@suse.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/core/base64.c

index e452f7d41ad84cee2545259bbac1da0856e9c317..ec11be261b7e1b31b8032436e61ebd6b3a9fe552 100644 (file)
@@ -36,7 +36,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
  *
  */
 
-static const char base64[64] =
+static const char base64[ 64 + 1 /* NUL */ ] =
        "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
 
 /**