[PATCH] elfclassify tool

Florian Weimer fweimer@redhat.com
Mon Jul 29 08:44:00 GMT 2019


* Mark Wielaard:

> +  if (elf == NULL)
> +    {
> +      /* This likely means it just isn't an ELF file, probably not a
> +	 real issue, but warn if verbose reporting.  */
> +      if (verbose > 0)
> +	fprintf (stderr, "warning: %s: %s\n", current_path, elf_errmsg (-1));
> +      return false;
> +    }

Is it possible to distinguish the error from a memory allocation error?
It would be wrong to mis-classify a file just because the system is low
on memory.

Thanks,
Florian



More information about the Elfutils-devel mailing list