CPP: added enforceNoDataAvail()

After deserialization of parameters during an AIDL call and before
calling the implementation,  check that there's no bytes left to read on
the parcel.

More details can be found at go/safer-parcel.

Bug: 208509444
Test: aidl_integration_test
Change-Id: Ic7bda3d3773b348c957981d4447f987bebccfa57
19 files changed
tree: 1097cf70b540fefb268604f9ec73b98c2c5ba2c1
  1. aidl_api/
  2. build/
  3. metadata/
  4. tests/
  5. trace/
  6. aidl-format.sh
  7. aidl.cpp
  8. aidl.h
  9. aidl_checkapi.cpp
  10. aidl_checkapi.h
  11. aidl_const_expressions.cpp
  12. aidl_dumpapi.cpp
  13. aidl_dumpapi.h
  14. aidl_language.cpp
  15. aidl_language.h
  16. aidl_language_l.ll
  17. aidl_language_y.yy
  18. aidl_to_cpp.cpp
  19. aidl_to_cpp.h
  20. aidl_to_cpp_common.cpp
  21. aidl_to_cpp_common.h
  22. aidl_to_java.cpp
  23. aidl_to_java.h
  24. aidl_to_ndk.cpp
  25. aidl_to_ndk.h
  26. aidl_to_rust.cpp
  27. aidl_to_rust.h
  28. aidl_typenames.cpp
  29. aidl_typenames.h
  30. aidl_unittest.cpp
  31. Android.bp
  32. ast_java.cpp
  33. ast_java.h
  34. ast_java_unittest.cpp
  35. check_valid.cpp
  36. check_valid.h
  37. code_writer.cpp
  38. code_writer.h
  39. code_writer_unittest.cpp
  40. comments.cpp
  41. comments.h
  42. diagnostics.cpp
  43. diagnostics.h
  44. diagnostics.inc
  45. diagnostics_unittest.cpp
  46. generate_aidl_mappings.cpp
  47. generate_aidl_mappings.h
  48. generate_cpp.cpp
  49. generate_cpp.h
  50. generate_cpp_unittest.cpp
  51. generate_java.cpp
  52. generate_java.h
  53. generate_java_binder.cpp
  54. generate_ndk.cpp
  55. generate_ndk.h
  56. generate_rust.cpp
  57. generate_rust.h
  58. hiddenapi-greylist
  59. import_resolver.cpp
  60. import_resolver.h
  61. io_delegate.cpp
  62. io_delegate.h
  63. io_delegate_unittest.cpp
  64. location.cpp
  65. location.h
  66. logging.cpp
  67. logging.h
  68. main.cpp
  69. NOTICE
  70. options.cpp
  71. options.h
  72. options_unittest.cpp
  73. os.h
  74. OWNERS
  75. parser.cpp
  76. parser.h
  77. permission.cpp
  78. permission.h
  79. preprocess.cpp
  80. preprocess.h
  81. PREUPLOAD.cfg
  82. README.md
  83. run_integration_tests.sh
  84. TEST_MAPPING
README.md

Documentation for this project is currently maintained here:

https://source.android.com/devices/architecture/aidl/overview