dfu: ram: fix number base of RAM entity parameters
PATCH 1/1 dfu: ram: fix number base of RAM entity parameters
From: Stephen Warren <[email protected]>
U-Boot typically interprets unprefixed numbers as base 16, and DFU RAM entity parsing has historically done so. Reverse the change to default to base 10, so that values in previously working command-lines aren't mis-parsed, causing RAM corruption, crashes, hangs, etc.
--- drivers/dfu/dfu_ram.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/dfu/dfu_ram.c +2 -2
@@ -72,8 +72,8 @@ int dfu_fill_entity_ram(struct dfu_entity *dfu, char *devstr, char *s) } dfu->layout =DFU_RAM_ADDR ; - dfu->data.ram.start = (void *)simple_strtoul (argv[1 ],NULL ,0 ); - dfu->data.ram.size =simple_strtoul (argv[2 ],NULL ,0 ); + dfu->data.ram.start = (void *)simple_strtoul (argv[1 ],NULL ,16 ); + dfu->data.ram.size =simple_strtoul (argv[2 ],NULL ,16 ); dfu->write_medium = dfu_write_medium_ram; dfu->get_medium_size = dfu_get_medium_size_ram;
Signature · 1 line
2.8.1
PATCH 1/1 dfu: ram: fix number base of RAM entity parameters
Quoted 7 lines · Stephen Warren
From: Stephen Warren <[email protected]>
U-Boot typically interprets unprefixed numbers as base 16, and DFU RAM entity parsing has historically done so. Reverse the change to default to base 10, so that values in previously working command-lines aren't mis-parsed, causing RAM corruption, crashes, hangs, etc.
Quoted 6 lines
Fixes 6aeb877afef0 ("drivers: dfu: ram: fix a crash with dfu ram with invalid dfu_alt_info env")Cc Mugunthan V N <[email protected]>Cc Tom Rini <[email protected]>Signed-off-by Stephen Warren <[email protected]>---
Regards
Mugunthan V N
PATCH 1/1 dfu: ram: fix number base of RAM entity parameters
Hi Mugunthan,
Quoted 12 lines · Stephen Warren
Quoted 11 lines
From: Stephen Warren <[email protected]>
U-Boot typically interprets unprefixed numbers as base 16, and DFU RAM entity parsing has historically done so. Reverse the change to default to base 10, so that values in previously working command-lines aren't mis-parsed, causing RAM corruption, crashes, hangs, etc.
Fixes 6aeb877afef0 ("drivers: dfu: ram: fix a crash with dfu ramwith invalid
dfu_alt_infoenv")
Quoted 6 lines
Quoted 4 lines
Cc Mugunthan V N <[email protected]>Cc Tom Rini <[email protected]>Signed-off-by Stephen Warren <[email protected]>---
Reviewed-by Mugunthan V N <[email protected]>
I assume that you have also tested this patch on your setup?
Would it be possible to also receive Tested-by: from you?
Quoted 5 lines
Regards
Mugunthan V N
Signature · 5 lines
Best regards, Lukasz Majewski Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
PATCH 1/1 dfu: ram: fix number base of RAM entity parameters
Quoted 19 lines · Lukasz Majewski
Hi Mugunthan,
Quoted 17 lines · Stephen Warren
Quoted 15 lines
From: Stephen Warren <[email protected]>
U-Boot typically interprets unprefixed numbers as base 16, and DFU RAM entity parsing has historically done so. Reverse the change to default to base 10, so that values in previously working command-lines aren't mis-parsed, causing RAM corruption, crashes, hangs, etc.
Fixes 6aeb877afef0 ("drivers: dfu: ram: fix a crash with dfu ramwith invalid
dfu_alt_infoenv")Cc Mugunthan V N <[email protected]>Cc Tom Rini <[email protected]>Signed-off-by Stephen Warren <[email protected]>---
Quoted 6 lines
Quoted 1 line
Reviewed-by Mugunthan V N <[email protected]>I assume that you have also tested this patch on your setup?
Would it be possible to also receive Tested-by: from you?
Tested the patch successfully on AM335x BBB.
Regards
Mugunthan V N