Few tests needed to properly check for asprintf and system calls return
values with _FORTIFY_SOURCE enabled.
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
}
char *filename;
- asprintf (&filename, INPUT_PREFIX "%s", input_files[i]);
+ if (asprintf (&filename, INPUT_PREFIX "%s", input_files[i]) < 0)
+ {
+ printf ("asprintf failed, aborting!\n");
+ return ERROR_FILENAME;
+ }
result = bench_file (json_ctx, input_files[i], filename, locale + 1);
if (result != OK)
#include <sys/types.h>
#include <sys/uio.h>
#include <elf.h>
+#include <support/xstdlib.h>
#include <support/xunistd.h>
#include <support/check.h>
#include <string.h>
char str[80];
sprintf (str, "cat /proc/%d/maps", pid);
puts (str);
- system (str);
+ xsystem (str);
fflush (stdout);
TEST_VERIFY_EXIT (ptrace (PTRACE_TRACEME) == 0);