Skip to content
Browse files

kconfig: Avoid potential issue parsing generated_dts_board.conf

Splitting a string like 'foo="bar=baz"' on '=' will give ['foo', '"bar',
'baz"'] instead of the intended ['foo', '"bar=baz"']. split() with
maxsplit=1 to avoid potential issues.

Not seen in practice. Just some future safety.

Signed-off-by: Ulf Magnusson <>
  • Loading branch information...
ulfalizer authored and nashif committed Apr 8, 2019
1 parent 247337a commit 86b0c22dc4021e925f43f80d3efbc1b358786afe
Showing with 1 addition and 1 deletion.
  1. +1 −1 scripts/kconfig/
@@ -20,7 +20,7 @@
with open(GENERATED_DTS_BOARD_CONF, 'r', encoding='utf-8') as fd:
for line in fd:
if '=' in line:
define, val = line.split('=')
define, val = line.split('=', 1)
dt_defines[define] = val.strip()

def _dt_units_to_scale(unit):

0 comments on commit 86b0c22

Please sign in to comment.
You can’t perform that action at this time.