1# Regression test for #342: 2# Possible null-pointer dereference in pb_decode.c 3 4Import("env") 5 6# Define the compilation options 7opts = env.Clone() 8opts.Append(CPPDEFINES = {'PB_OLD_CALLBACK_STYLE': 1}) 9 10# Build new version of core 11strict = opts.Clone() 12strict.Append(CFLAGS = strict['CORECFLAGS']) 13strict.Object("pb_decode_oldcallback.o", "$NANOPB/pb_decode.c") 14strict.Object("pb_encode_oldcallback.o", "$NANOPB/pb_encode.c") 15strict.Object("pb_common_oldcallback.o", "$NANOPB/pb_common.c") 16 17opts.NanopbProto("extensions") 18testprog = opts.Program(["test_extensions.c", "extensions.pb.c", "pb_encode_oldcallback.o", "pb_decode_oldcallback.o", "pb_common_oldcallback.o"]) 19 20opts.RunTest(testprog) 21 22