]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
dlltool: replace unchecked malloc with xmalloc
authorNandakumar Edamana <nandakumar@nandakumar.co.in>
Thu, 4 Apr 2024 05:26:14 +0000 (10:56 +0530)
committerAlan Modra <amodra@gmail.com>
Thu, 4 Apr 2024 07:28:50 +0000 (17:58 +1030)
binutils/dlltool.c

index 066c99a4d4f761cafb07c1a921d23f967767c08d..7a3d20f0af9f3e9684a030b97905b97921a25df4 100644 (file)
@@ -876,7 +876,7 @@ dlltmp (char **buf, const char *fmt)
 {
   if (!*buf)
     {
-      *buf = malloc (strlen (tmp_prefix) + 64);
+      *buf = xmalloc (strlen (tmp_prefix) + 64);
       sprintf (*buf, fmt, tmp_prefix);
     }
   return *buf;