mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-10 03:09:08 +08:00
brcm63xx: imagetag: Fixed occaisonal wrong CRC in image due to using strncpy to copy the CRC into the imagetag. strncpy stops copying after a 00 byte, memcpy doesn't.
SVN-Revision: 24000
This commit is contained in:
parent
5bf3838a00
commit
6cd4575153
@ -32,9 +32,9 @@ union int2char {
|
||||
char output[4];
|
||||
};
|
||||
|
||||
/* This appears to be necessary due to alignment issues */
|
||||
/* Convert uint32_t CRC to bigendian and copy it into a character array */
|
||||
#define int2tag(tag, value) intchar.input = htonl(value); \
|
||||
strncpy(tag, intchar.output, sizeof(union int2char))
|
||||
memcpy(tag, intchar.output, sizeof(union int2char))
|
||||
|
||||
/* Kernel header */
|
||||
struct kernelhdr {
|
||||
|
Loading…
x
Reference in New Issue
Block a user