mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-24 04:56:14 +02:00
[tools] 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.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24000 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
71b59686b1
commit
59e644e826
@ -32,9 +32,9 @@ union int2char {
|
|||||||
char output[4];
|
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); \
|
#define int2tag(tag, value) intchar.input = htonl(value); \
|
||||||
strncpy(tag, intchar.output, sizeof(union int2char))
|
memcpy(tag, intchar.output, sizeof(union int2char))
|
||||||
|
|
||||||
/* Kernel header */
|
/* Kernel header */
|
||||||
struct kernelhdr {
|
struct kernelhdr {
|
||||||
|
Loading…
Reference in New Issue
Block a user