fix overlapping memcpy; ok bcallah@
This commit is contained in:
parent
ac0466a675
commit
5012fce774
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.40 2014/08/10 09:58:05 espie Exp $
|
||||
# $OpenBSD: Makefile,v 1.41 2014/12/01 15:13:52 naddy Exp $
|
||||
|
||||
# Other archs have not been tested
|
||||
ONLY_FOR_ARCHS = amd64 i386
|
||||
@ -70,6 +70,7 @@ pre-patch:
|
||||
#.endfor
|
||||
@perl -pi -e 's|\r\n|\n|g' ${WRKDIST}/makefile \
|
||||
${WRKDIST}/src/emu/fileio.h \
|
||||
${WRKDIST}/src/emu/cpu/m68000/m68kmake.c \
|
||||
${WRKDIST}/src/emu/machine/netlist.h \
|
||||
${WRKDIST}/src/osd/sdl/sdl.mak
|
||||
@ln -s ${MODPY_BIN} ${WRKDIR}/bin/python
|
||||
|
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-src_emu_cpu_m68000_m68kmake_c,v 1.1 2014/12/01 15:13:52 naddy Exp $
|
||||
--- src/emu/cpu/m68000/m68kmake.c.orig Mon Dec 1 02:51:23 2014
|
||||
+++ src/emu/cpu/m68000/m68kmake.c Mon Dec 1 02:51:53 2014
|
||||
@@ -611,7 +611,7 @@ static int fgetline(char* buff, int nchars, FILE* file
|
||||
if(fgets(buff, nchars, file) == NULL)
|
||||
return -1;
|
||||
if(buff[0] == '\r')
|
||||
- memcpy(buff, buff + 1, nchars - 1);
|
||||
+ memmove(buff, buff + 1, nchars - 1);
|
||||
|
||||
length = strlen(buff);
|
||||
while(length && (buff[length-1] == '\r' || buff[length-1] == '\n'))
|
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.34 2014/08/10 09:58:05 espie Exp $
|
||||
# $OpenBSD: Makefile,v 1.35 2014/12/01 15:13:52 naddy Exp $
|
||||
|
||||
# Other archs have not been tested
|
||||
ONLY_FOR_ARCHS = amd64 i386
|
||||
@ -66,6 +66,7 @@ pre-patch:
|
||||
#.endfor
|
||||
@perl -pi -e 's|\r\n|\n|g' ${WRKDIST}/makefile \
|
||||
${WRKDIST}/src/emu/fileio.h \
|
||||
${WRKDIST}/src/emu/cpu/m68000/m68kmake.c \
|
||||
${WRKDIST}/src/emu/machine/netlist.h \
|
||||
${WRKDIST}/src/osd/sdl/sdl.mak
|
||||
@ln -s ${MODPY_BIN} ${WRKDIR}/bin/python
|
||||
|
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-src_emu_cpu_m68000_m68kmake_c,v 1.1 2014/12/01 15:13:53 naddy Exp $
|
||||
--- src/emu/cpu/m68000/m68kmake.c.orig Mon Dec 1 02:51:23 2014
|
||||
+++ src/emu/cpu/m68000/m68kmake.c Mon Dec 1 02:51:53 2014
|
||||
@@ -611,7 +611,7 @@ static int fgetline(char* buff, int nchars, FILE* file
|
||||
if(fgets(buff, nchars, file) == NULL)
|
||||
return -1;
|
||||
if(buff[0] == '\r')
|
||||
- memcpy(buff, buff + 1, nchars - 1);
|
||||
+ memmove(buff, buff + 1, nchars - 1);
|
||||
|
||||
length = strlen(buff);
|
||||
while(length && (buff[length-1] == '\r' || buff[length-1] == '\n'))
|
Loading…
x
Reference in New Issue
Block a user