]> git.cworth.org Git - fips/blobdiff - execute.c
Add xmalloc function
[fips] / execute.c
index 0719e2da23ce1c1b18d4f43a2dc62b5b6abfdb2d..07fd30f4e26f2d282032e4702e42cdecb8ee910a 100644 (file)
--- a/execute.c
+++ b/execute.c
@@ -36,6 +36,7 @@
 #include <gelf.h>
 
 #include "execute.h"
+#include "xmalloc.h"
 
 /* Terminate a string representing a filename at the final '/' to
  * eliminate the final filename component, (leaving only the directory
@@ -279,6 +280,9 @@ find_libfips_path (void *ctx, const char *program)
                 "\t%s\n"
                 "and\n"
                 "\t%s/" BINDIR_TO_LIBFIPSDIR "\n", bin_path, bin_path);
+
+       fprintf(stderr, "\nIt's possible fips was not compiled with support for %d-bit applications.\n", bits);
+       fprintf(stderr, "Perhaps you need to install gcc-multilib and re-compile fips?\n");
        exit (1);
 }
 
@@ -291,11 +295,7 @@ execute_with_fips_preload (int argc, char * const argv[])
        char **execvp_args;
        int i;
 
-       execvp_args = malloc((argc + 1) * sizeof(char *));
-       if (execvp_args == NULL) {
-               fprintf (stderr, "Out of memory,\n");
-               return 1;
-       }
+       execvp_args = xmalloc((argc + 1) * sizeof(char *));
 
        for (i = 0; i < argc; i++) {
                execvp_args[i] = argv[i];