]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
cast for correct value
authorAlan T. DeKok <aland@freeradius.org>
Tue, 6 Feb 2018 19:57:18 +0000 (14:57 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 6 Feb 2018 19:57:18 +0000 (14:57 -0500)
src/lib/value.c

index fff978ac3be3c10a13840594baaa4b19566d6e95..d4072356beb1a38d37a1c7110ae2243fe5b06b40 100644 (file)
@@ -1069,7 +1069,7 @@ static int value_data_hton(value_data_t *dst, PW_TYPE dst_type, void const *src,
                /*
                 *      Prefix is too long.
                 */
-               if (src[1] > 128) return -1;
+               if (((uint8_t const *)src)[1] > 128) return -1;
 
                if (src_len < dst_len) {
                        memcpy(dst_ptr, src, src_len);