bug #38023: avrdude doesn't return an error code when attempting

to upload an invalid Intel HEX file
* fileio.c (ihex2b): Turn the "No end of file record found" warning
into an error if no valid record was found at all.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1195 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
joerg_wunsch 2013-09-02 18:18:15 +00:00
parent a678239bb0
commit 24eb12d3f5
3 changed files with 24 additions and 5 deletions

View File

@ -1,3 +1,10 @@
2013-09-02 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
bug #38023: avrdude doesn't return an error code when attempting
to upload an invalid Intel HEX file
* fileio.c (ihex2b): Turn the "No end of file record found" warning
into an error if no valid record was found at all.
2013-09-02 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
Submitted by Claus-Justus Heine:

2
NEWS
View File

@ -82,6 +82,8 @@ Current:
is enabled AND target has a very slow clock
- bug #39893: Verification failure with AVRISPmkII and Xmega
- bug #38713: Compilation of the documentation breaks with texinfo-5
- bug #38023: avrdude doesn't return an error code when attempting
to upload an invalid Intel HEX file
* Keep track of input file contents

View File

@ -372,6 +372,15 @@ static int ihex2b(char * infile, FILE * inf,
} /* while */
if (maxaddr == 0) {
fprintf(stderr,
"%s: ERROR: No valid record found in Intel Hex "
"file \"%s\"\n",
progname, infile);
return -1;
}
else {
fprintf(stderr,
"%s: WARNING: no end of file record found for Intel Hex "
"file \"%s\"\n",
@ -379,6 +388,7 @@ static int ihex2b(char * infile, FILE * inf,
return maxaddr;
}
}
static int b2srec(unsigned char * inbuf, int bufsize,
int recsize, int startaddr,