diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2016-05-03 22:15:49 +0200 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2016-05-03 22:35:27 +0200 |
commit | c45606eb95a7171b0dc801e91d35034957ad5e9e (patch) | |
tree | f42ca81508e38bd9e90131184dc780b15c30c276 /TODO | |
parent | fa394301e2119ab594b266346cdc114a67af98d9 (diff) |
strbuf: set the proper character when creating new nodes
Commit 82501b3fc added an early break when a terminal node is found to
incorrect place -- before setting c. This caused trie to be built that
does not correspond to what it points to in buffer, causing incorrect
deduplications:
# cat /etc/udev/rules.d/99-bug.rules
ENV{FOO}=="0"
ENV{xx0}=="BAR"
ENV{BAZ}=="00"
# udevadm test
* RULE /etc/udev/rules.d/99-bug.rules:1, token: 0, count: 2, label: ''
M ENV match 'FOO' '0'(plain)
* RULE /etc/udev/rules.d/99-bug.rules:2, token: 2, count: 2, label: ''
M ENV match 'xx0' 'BAR'(plain)
* RULE /etc/udev/rules.d/99-bug.rules:3, token: 4, count: 2, label: ''
M ENV match 'BAZ' 'x0'(plain)
* END
The addition of "xx0" following "0" will cause a trie like this to be
created:
c=\0
c=0 "0"
c=0 "xx0" <-- note the c is incorrect here, causing "00" to be
c=O "FOO" deduplicated to it
c=R "BAR"
This in effect caused the usb_modeswitch rule for Huawei modems to never
match and this never be switched to serial mode from mass storage.
Diffstat (limited to 'TODO')
0 files changed, 0 insertions, 0 deletions