Andrei Borzenkov 6e21195890 progress: avoid NULL dereference for net files
From original patch by dann frazier <dann.frazier@canonical.com>:

  grub_net_fs_open() saves off a copy of the file structure it gets passed and
  uses it to create a bufio structure. It then overwrites the passed in file
  structure with this new bufio structure. Since file->name doesn't get set
  until we return back to grub_file_open(), it means that only the bufio
  structure gets a valid file->name. The "real" file's name is left
  uninitialized. This leads to a crash when the progress module hook is called
  on it.

grub_net_fs_open() already saved copy of file name as ->net->name, so change
progress module to use it.

Also, grub_file_open may leave file->name as NULL if grub_strdup fails. Check
for it.

Also-By: dann frazier <dann.frazier@canonical.com>
2015-10-10 11:44:14 +03:00
..
2011-05-13 16:36:05 +02:00
2013-11-16 20:52:55 +01:00
2010-08-30 00:54:15 +02:00
2013-04-27 14:11:12 +02:00
2013-11-07 06:35:50 +01:00
2015-07-22 21:05:11 +02:00
2015-03-03 20:50:37 +01:00
2013-11-13 00:43:03 +01:00
2011-07-05 20:24:20 +02:00
2012-02-26 18:09:07 +01:00
2013-12-18 05:28:05 +01:00
2015-06-20 23:38:18 +03:00
2013-11-16 20:52:55 +01:00