Fix parser not always null-terminating model desc

The inference parser copies the description from the model using
strncpy, which will only add a null-terminator if the source string is
shorter than the destination. Otherwise, if the bytes copied are not
null-terminated, the destination is left without one.

To ensure that the description is always null-terminated, the last byte
of the description is now always overwritten with one.

Change-Id: I49c23acd12d661e1f5c37088dba2e37935f25fa5
Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
1 file changed
tree: 7aa16ff8a1b8590c0a5b565228bd1ae518045db5
  1. .clang-format
  2. .gitignore
  3. CMakeLists.txt
  4. LICENSE.txt
  5. README.md
  6. SECURITY.md
  7. applications/
  8. cmsis.cmake
  9. event_recorder.cmake
  10. lib/
  11. openamp/
  12. rtos/
  13. tflite_micro.cmake
README.md

Arm(R) Ethos(TM)-U core software

Building

The Arm(R) Ethos(TM)-U core software is built with CMake. It is recommended to build out of tree like illustrated below.

$ cmake -B build -DCMAKE_TOOLCHAIN_FILE=<core_platform_path>/cmake/toolchain/<toolchain_file> -DTARGET_CPU=cortex-m<nr><features>
$ cmake --build build -j8

Available build options can be listed with cmake -LH ...

Supported CPU targets are any of the Cortex(R)-M processors with any of the supported features, for example cortex-m33+nodsp+nofp. A toolchain file is required to cross compile the software.

Contributions

The Arm Ethos-U project welcomes contributions under the Apache-2.0 license.

Before we can accept your contribution, you need to certify its origin and give us your permission. For this process we use the Developer Certificate of Origin (DCO) V1.1 (https://developercertificate.org).

To indicate that you agree to the terms of the DCO, you "sign off" your contribution by adding a line with your name and e-mail address to every git commit message. You must use your real name, no pseudonyms or anonymous contributions are accepted. If there are more than one contributor, everyone adds their name and e-mail to the commit message.

Author: John Doe \<john.doe@example.org\>
Date:   Mon Feb 29 12:12:12 2016 +0000

Title of the commit

Short description of the change.

Signed-off-by: John Doe john.doe@example.org
Signed-off-by: Foo Bar foo.bar@example.org

The contributions will be code reviewed by Arm before they can be accepted into the repository.

In order to submit a contribution push your patch to ssh://<GITHUB_USER_ID>@review.mlplatform.org:29418/ml/ethos-u/ethos-u-core-software. To do this you will need to sign-in to review.mlplatform.org using a GitHub account and add your SSH key under your settings. If there is a problem adding the SSH key make sure there is a valid email address in the Email Addresses field.

Security

Please see Security.

License

The Arm Ethos-U core software is provided under an Apache-2.0 license. Please see LICENSE.txt for more information.

Trademark notice

Arm, Cortex and Ethos are registered trademarks of Arm Limited (or its subsidiaries) in the US and/or elsewhere.