]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
value: Limit null arguments in value box from str
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sun, 24 May 2020 15:02:42 +0000 (10:02 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sun, 24 May 2020 15:05:54 +0000 (10:05 -0500)
src/lib/util/value.c
src/lib/util/value.h

index 6c9e09f929803c97f6c2cda7ac1a39c3a1c8c3d2..3c8d0883c2ae9a61cf56c816b716988009122832 100644 (file)
@@ -4125,8 +4125,6 @@ int fr_value_box_from_str(TALLOC_CTX *ctx, fr_value_box_t *dst,
 
        if (!fr_cond_assert(*dst_type != FR_TYPE_INVALID)) return -1;
 
-       if (!in) return -1;
-
        len = (inlen < 0) ? strlen(in) : (size_t)inlen;
 
        /*
index 03ff79bed4c16901187c3a61a4d9c7e980b1cb52..f353421a1596783c4b7aca7ee96c3b2b3bf89d0c 100644 (file)
@@ -642,7 +642,8 @@ void                fr_value_box_increment(fr_value_box_t *vb);
  */
 int            fr_value_box_from_str(TALLOC_CTX *ctx, fr_value_box_t *dst,
                                      fr_type_t *dst_type, fr_dict_attr_t const *dst_enumv,
-                                     char const *src, ssize_t src_len, char quote, bool tainted);
+                                     char const *src, ssize_t src_len, char quote, bool tainted)
+                                     CC_HINT(nonnull(2,3,5));
 
 /*
  *     Lists