diff --git a/ChangeLog b/ChangeLog index bdb3a30c..141b4ed8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2021-11-07 Joerg Wunsch + + 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 Submitted by Martin Thierer: diff --git a/NEWS b/NEWS index 22f24697..405aa05c 100644 --- a/NEWS +++ b/NEWS @@ -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 diff --git a/update.c b/update.c index bf6749d7..95e1028f 100644 --- a/update.c +++ b/update.c @@ -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);