Browse Source

regex: call memcpy() ourselves

Call the hidden memcpy() ourselves otherwise gcc will emit a call to the
public memcpy() which goes through the PLT.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger 14 years ago
parent
commit
3aa584adcf
1 changed files with 2 additions and 1 deletions
  1. 2 1
      libc/misc/regex/regex_old.c

+ 2 - 1
libc/misc/regex/regex_old.c

@@ -8085,7 +8085,8 @@ regexec (
   int len = strlen (string);
   boolean want_reg_info = !preg->no_sub && nmatch > 0;
 
-  private_preg = *preg;
+  /* use hidden memcpy() ourselves rather than gcc calling public memcpy() */
+  memcpy(&private_preg, preg, sizeof(*preg));
 
   private_preg.not_bol = !!(eflags & REG_NOTBOL);
   private_preg.not_eol = !!(eflags & REG_NOTEOL);