]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
set inlen, too. CID #1469118
authorAlan T. DeKok <aland@freeradius.org>
Mon, 11 Apr 2022 23:54:20 +0000 (19:54 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 11 Apr 2022 23:54:20 +0000 (19:54 -0400)
src/lib/util/md4.c

index 65ef8b2c44b1b0bfd41dadeaef4573058b6b639e..3eb8f1f1cff07dfe2c9040e9c494e6a853e41cb9 100644 (file)
@@ -376,7 +376,10 @@ static void fr_md4_local_update(fr_md4_ctx_t *ctx, uint8_t const *in, size_t inl
         *      ubsan doesn't like arithmetic on
         *      NULL pointers.
         */
-       if (!in) in = (uint8_t[]){ 0x00 };
+       if (!in) {
+               in = (uint8_t[]){ 0x00 };
+               inlen = 0;
+       }
 
        /* Bytes already stored in ctx_local->buffer */
        count = (uint32_t)((ctx_local->count[0] >> 3) & 0x3f);