aboutsummaryrefslogtreecommitdiffstats
path: root/tools/firmware-utils/src
diff options
context:
space:
mode:
authorDaniel Dickinson <daniel@cshore.neomailbox.net>2010-11-15 04:08:09 +0000
committerDaniel Dickinson <daniel@cshore.neomailbox.net>2010-11-15 04:08:09 +0000
commit2d315771257eb6f1861774463c6b26550261f242 (patch)
tree1b5424f7a93a54ab358427a7b76274b8874a4bc5 /tools/firmware-utils/src
parentb6147a222069f94d5c0f890c77d376593214e7f6 (diff)
downloadmaster-187ad058-2d315771257eb6f1861774463c6b26550261f242.tar.gz
master-187ad058-2d315771257eb6f1861774463c6b26550261f242.tar.bz2
master-187ad058-2d315771257eb6f1861774463c6b26550261f242.zip
[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
Diffstat (limited to 'tools/firmware-utils/src')
-rw-r--r--tools/firmware-utils/src/imagetag.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/firmware-utils/src/imagetag.c b/tools/firmware-utils/src/imagetag.c
index 1fb45e9e95..0ecbada284 100644
--- a/tools/firmware-utils/src/imagetag.c
+++ b/tools/firmware-utils/src/imagetag.c
@@ -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 {