+2015-05-05 Mark Wielaard <mjw@redhat.com>
+
+ * dwfl_lineinfo.c (dwfl_lineinfo): Check info->file is valid.
+
2015-05-06 Roland McGrath <roland@hack.frob.com>
* dwfl_error.c (struct msgtable): Break type definition out of
/* Get information from a source line record returned by libdwfl.
- Copyright (C) 2005-2010 Red Hat, Inc.
+ Copyright (C) 2005-2010, 2015 Red Hat, Inc.
This file is part of elfutils.
This file is free software; you can redistribute it and/or modify
if (colp != NULL)
*colp = info->column;
+ if (unlikely (info->file >= info->files->nfiles))
+ {
+ __libdwfl_seterrno (DWFL_E (LIBDW, DWARF_E_INVALID_DWARF));
+ return NULL;
+ }
+
struct Dwarf_Fileinfo_s *file = &info->files->info[info->file];
if (mtime != NULL)
*mtime = file->mtime;