summaryrefslogtreecommitdiffstats
path: root/conf.d/project/alsa.d/ucm.sample/README
blob: e7f08ae90c51ac24fb62e2c21bc0171d5cce3685 (plain)
1
2
Should match sound card name ex: "HDA Intel PCH"
cp -r . /usr/share/alsa/ucm
0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
# Run a fuzz test to verify robustness against corrupted/malicious data.

Import("env", "malloc_env")

def set_pkgname(src, dst, pkgname):
    data = open(str(src)).read()
    placeholder = '// package name placeholder'
    assert placeholder in data
    data = data.replace(placeholder, 'package %s;' % pkgname)
    open(str(dst), 'w').write(data)

# We want both pointer and static versions of the AllTypes message
# Prefix them with package name.
env.Command("alltypes_static.proto", "#alltypes/alltypes.proto",
            lambda target, source, env: set_pkgname(source[0], target[0], 'alltypes_static'))
env.Command("alltypes_pointer.proto", "#alltypes/alltypes.proto",
            lambda target, source, env: set_pkgname(source[0], target[0], 'alltypes_pointer'))

p1 = env.NanopbProto(["alltypes_pointer", "alltypes_pointer.options"])
p2 = env.NanopbProto(["alltypes_static", "alltypes_static.options"])
fuzz = malloc_env.Program(["fuzztest.c",
                    "alltypes_pointer.pb.c",
                    "alltypes_static.pb.c",
                    "$COMMON/pb_encode_with_malloc.o",
                    "$COMMON/pb_decode_with_malloc.o",
                    "$COMMON/pb_common_with_malloc.o",
                    "$COMMON/malloc_wrappers.o"])

env.RunTest(fuzz)

fuzzstub = malloc_env.Program(["fuzzstub.c",
                    "alltypes_pointer.pb.c",
                    "alltypes_static.pb.c",
                    "$COMMON/pb_encode_with_malloc.o",
                    "$COMMON/pb_decode_with_malloc.o",
                    "$COMMON/pb_common_with_malloc.o",
                    "$COMMON/malloc_wrappers.o"])

generate_message = malloc_env.Program(["generate_message.c",
                    "alltypes_static.pb.c",
                    "$COMMON/pb_encode.o",
                    "$COMMON/pb_common.o"])