javlonsodikov / firmware-mod-kit

Automatically exported from code.google.com/p/firmware-mod-kit
1 stars 0 forks source link

crcalc.c does not update all the trx information #111

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. ./src/crcalc/patch.c 
   int patch_trx(char *buf, size_t size)
   needs to be fixed.
2. image size in TRX Header is not updated after executing crcalc.c

What is the expected output? What do you see instead?

image size in TRX Header should be updated after executing crcalc.c
but it is not updated.

What version of the product are you using? On what operating system?

fmk 0.99

Please provide any additional information below.

Original issue reported on code.google.com by kjh1311...@gmail.com on 29 Jul 2013 at 5:08

GoogleCodeExporter commented 9 years ago
As its name implies, crcalc is only supposed to update the CRC field. While it 
could be modified to update the size field in TRX and other headers, I would 
argue that it should *not* do this automatically because the header may only 
pertain to a portion of the firmware image and not the entire image. If crcalc 
erroneously updates the size field in the header, you could end up with a brick.

I'd consider adding a command line option to crcalc to tell it what the header 
size field should be, but this should not be the default action (the FMK 
scripts specifically attempt to keep the original firmware sizes the same in 
order to prevent possibly bricking the target device).

Original comment by heffne...@gmail.com on 7 Aug 2013 at 3:30