[riot-notifications] [RIOT-OS/RIOT] sys/fmt: add fmt_hex_bytes size probing (#14066)

Juergen Fitschen notifications at github.com
Tue May 12 17:45:16 CEST 2020


### Contribution description

The `fmt.h` header file advertises `fmt_hex_bytes(NULL, "0123")` to be a valid input but it crashes the application because a NULL pointer gets dereferenced.

This PR implements the advertised feature.

### Testing procedure

I extended the unit test. Running the tests must work flawlessly.

`make -C tests/unittests tests-fmt test`

### Issues/PRs references

*none*
You can view, comment on, or merge this pull request online at:

  https://github.com/RIOT-OS/RIOT/pull/14066

-- Commit Summary --

  * sys/fmt: add fmt_hex_bytes size probing

-- File Changes --

    M sys/fmt/fmt.c (5)
    M tests/unittests/tests-fmt/tests-fmt.c (3)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/14066.patch
https://github.com/RIOT-OS/RIOT/pull/14066.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/14066
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200512/d11fcf28/attachment.htm>


More information about the notifications mailing list