mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-28 09:39:00 +00:00
ipq806x: fix boot hang if cmdline contains words with r in the middle
The ATB DTB mangle code will enter an infinite loop if it encounters a
word in the command line that contains an r in the middle of the word.
Fix this by increasing ptr everytime before invoking strchr, ot avoid
finding the same r again.
This fixes booting at least on Netgear R7500v1, which contains
"ubi.mtd=rootfs" in its commandline, triggering the misbehaviour.
Fixes: 0ddcbee261
("ipq806x: activate ATAG DTB mangle and EA8500 rootblock in dts")
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
This commit is contained in:
parent
ba1aa4e33b
commit
532eb5f581
@ -64,9 +64,9 @@ Signed-off-by: Adrian Panella <ianchi74@outlook.com>
|
||||
+ ptr = str - 1;
|
||||
+
|
||||
+ do {
|
||||
+ ptr++;
|
||||
+ //first find an 'r' at the begining or after a space
|
||||
+ do {
|
||||
+ ptr++;
|
||||
+ ptr = strchr(ptr, 'r');
|
||||
+ if(!ptr) return dest;
|
||||
+
|
||||
|
Loading…
Reference in New Issue
Block a user