From: Gene Cumm Date: Sun, 1 Aug 2010 16:39:19 +0000 (-0400) Subject: chain: Just assign the value rather than using memcpy() X-Git-Tag: syslinux-4.03-pre1~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6ad62265d73432b5379f04f484c9c1d8934f5aa4;p=platform%2Fupstream%2Fsyslinux.git chain: Just assign the value rather than using memcpy() --- diff --git a/com32/modules/chain.c b/com32/modules/chain.c index 1893eb3..15c181c 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++;