1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-24 15:28:10 +00:00

legacy+core: accept only valid UTF-8 strings via nanopb

This commit is contained in:
Pavol Rusnak 2019-12-20 13:21:03 +00:00
parent 1c22dac6eb
commit 5bf8eca350
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
2 changed files with 3 additions and 1 deletions

View File

@ -155,6 +155,8 @@ env.Replace(
'USE_HAL_DRIVER',
('STM32_HAL_H', '"<stm32f4xx.h>"'),
'PB_FIELD_16BIT',
'PB_ENCODE_ARRAYS_UNPACKED',
'PB_VALIDATE_UTF8',
] + CPPDEFINES_MOD,
ASFLAGS=CPU_ASFLAGS,
ASPPFLAGS='$CFLAGS $CCFLAGS', )

View File

@ -125,7 +125,7 @@ DEBUG_LINK ?= 0
DEBUG_LOG ?= 0
CFLAGS += -Wno-sequence-point
CFLAGS += -I../vendor/nanopb -Iprotob -DPB_FIELD_16BIT=1 -DPB_ENCODE_ARRAYS_UNPACKED=1
CFLAGS += -I../vendor/nanopb -Iprotob -DPB_FIELD_16BIT=1 -DPB_ENCODE_ARRAYS_UNPACKED=1 -DPB_VALIDATE_UTF8=1
CFLAGS += -DDEBUG_LINK=$(DEBUG_LINK)
CFLAGS += -DDEBUG_LOG=$(DEBUG_LOG)
CFLAGS += -DSCM_REVISION='"$(shell git rev-parse HEAD | sed 's:\(..\):\\x\1:g')"'