• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Révisiona4f8732b2a0c2cf48cff088311ed0ee2b17435b9 (tree)
l'heure2015-11-20 23:08:29
AuteurRonald Hoogenboom <hoogenboom30@zonn...>
CommiterNick Clifton

Message de Log

Fix building objcopy under mingw64 by replacing uses of strndup with xstrndup.

* objcopy.c (parse_symflags): Use xstrndup in place of strndup.
(copy_main): Likewise.

Change Summary

Modification

--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,8 @@
1+2015-11-20 Ronald Hoogenboom <hoogenboom30@zonnet.nl>
2+
3+ * objcopy.c (parse_symflags): Use xstrndup in place of strndup.
4+ (copy_main): Likewise.
5+
16 2015-11-20 Nick Clifton <nickc@redhat.com>
27
38 * po/ca.po: New Catalan translation.
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -771,7 +771,7 @@ parse_symflags (const char *s, char **other)
771771
772772 #define PARSE_OTHER(fname,fval) \
773773 else if (len >= (int) sizeof fname && strncasecmp (fname, s, sizeof fname - 1) == 0) \
774- fval = strndup (s + sizeof fname - 1, len - sizeof fname + 1)
774+ fval = xstrndup (s + sizeof fname - 1, len - sizeof fname + 1)
775775
776776 if (0) ;
777777 PARSE_FLAG ("local", BSF_LOCAL);
@@ -4082,10 +4082,10 @@ copy_main (int argc, char *argv[])
40824082 fatal (_("bad format for %s"), "--add-symbol");
40834083 t = strchr (s + 1, ':');
40844084
4085- newsym->symdef = strndup (optarg, s - optarg);
4085+ newsym->symdef = xstrndup (optarg, s - optarg);
40864086 if (t)
40874087 {
4088- newsym->section = strndup (s + 1, t - (s + 1));
4088+ newsym->section = xstrndup (s + 1, t - (s + 1));
40894089 newsym->symval = strtol (t + 1, NULL, 0);
40904090 }
40914091 else