On 11/17/2011 01:11 PM, Stefan Berger wrote:
> +
> +    if (strlen(chainname) > MAX_CHAIN_SUFFIX_SIZE) {
> +        virNWFilterReportError(VIR_ERR_INVALID_ARG,
> +                               _("Name of chain is longer than %u 
> characters"),
> +                               MAX_CHAIN_SUFFIX_SIZE);
> +        return NULL;
> +    }

Oh, one other thought...

> +          <data type="string">
> +            <param name="pattern">arp[a-zA-Z0-9_\.:-]*</param>
> +          </data>

Since it's easy enough to do, we should probably enforce the strlen rule
during XML validation, by writing this with {0,9} instead of * (since
MAX_CHAIN_SUFFIX_SIZE of 12 minus strlen("arp") is 9), and so forth for
the other patterns.

-- 
Eric Blake   ebl...@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to