X-Git-Url: http://cgit.sxemacs.org/?p=sxemacs;a=blobdiff_plain;f=src%2Fsearch.c;h=ff9f338c1789bd16bf8b182a1b951dbcb60eca10;hp=1a5f0a129e7f32997e26af73c10de0bf9a8189d3;hb=69c63e4c742c7fc7dc742ec65074c02d3eb21e60;hpb=eaec8ad2fad951d293c7957dfc3d501da73c0a59 diff --git a/src/search.c b/src/search.c index 1a5f0a1..ff9f338 100644 --- a/src/search.c +++ b/src/search.c @@ -766,8 +766,11 @@ fast_string_match(Lisp_Object regexp, const Bufbyte * nonreloc, return with failure... */ return -1; - newnonreloc = alloca(length); - memcpy((void*)newnonreloc, (void*)XSTRING_DATA(reloc), length); + Bufbyte *copy = alloca(length); + memcpy((void*)copy, + (const void*)XSTRING_DATA(reloc), + length); + newnonreloc = copy; } }