bug #50517: Reading fails if "immediate mode" for output file format

is selected - fileio: invalid operation=1

* update.c (do_op): refuse to write to "immediate format" argument




git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1464 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Joerg Wunsch 2021-11-07 16:22:00 +00:00
parent 1b3afa4cef
commit 84af4b36a1
3 changed files with 12 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2021-11-07 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
bug #50517: Reading fails if "immediate mode" for output file format is selected - fileio: invalid operation=1
* update.c (do_op): refuse to write to "immediate format" argument
2021-11-07 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
Submitted by Martin Thierer:

1
NEWS
View File

@ -64,6 +64,7 @@ Current:
bug #55734: USBtiny programming of ATmega328p broken by Patch #9278
bug #58495: Add atmega324pb support to avrdude.conf.in
bug #60863: avrftdi programming error probably caused by multiple, consecutive empty pages
bug #50517: Reading fails if "immediate mode" for output file format is selected - fileio: invalid operation=1
* Patches:
patch #9482: Add support for UPDI and AVR8X

View File

@ -230,6 +230,12 @@ int do_op(PROGRAMMER * pgm, struct avrpart * p, UPDATE * upd, enum updateflags f
/*
* read out the specified device memory and write it to a file
*/
if (upd->format == FMT_IMM) {
avrdude_message(MSG_INFO,
"%s: Invalid file format 'immediate' for output\n",
progname, upd->filename);
return -1;
}
if (quell_progress < 2) {
avrdude_message(MSG_INFO, "%s: reading %s memory:\n",
progname, mem->desc);