aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGene Cumm <gene.cumm@gmail.com>2010-08-01 12:39:19 -0400
committerGene Cumm <gene.cumm@gmail.com>2010-08-01 13:02:35 -0400
commit6ad62265d73432b5379f04f484c9c1d8934f5aa4 (patch)
treedb608605641687c5c14ca75e9963153299714127
parent4643526cfb67af3feb4f8cad5622a02689abf71e (diff)
downloadsyslinux-6ad62265d73432b5379f04f484c9c1d8934f5aa4.tar.gz
syslinux-6ad62265d73432b5379f04f484c9c1d8934f5aa4.tar.xz
syslinux-6ad62265d73432b5379f04f484c9c1d8934f5aa4.zip
chain: Just assign the value rather than using memcpy()
-rw-r--r--com32/modules/chain.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/com32/modules/chain.c b/com32/modules/chain.c
index 1893eb38..15c181c2 100644
--- a/com32/modules/chain.c
+++ b/com32/modules/chain.c
@@ -1720,10 +1720,7 @@ int main(int argc, char *argv[])
/* ds:[bp+28] must be 0x0000003f */
regs.ds = (tsize >> 4) + (opt.seg - 2);
/* "Patch" into the extra row */
- if (!memcpy(data[ndata].data + tsize - 4, "\x3f\0\0\0", 4)) {
- error("Failed to patch DRMK\n");
- goto bail;
- }
+ *(int *)(data[ndata].data + tsize - 4) = 0x0000003f;
}
ndata++;