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:
parent
a678239bb0
commit
24eb12d3f5
|
@ -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
2
NEWS
|
@ -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
|
||||
|
||||
|
|
20
fileio.c
20
fileio.c
|
@ -372,12 +372,22 @@ static int ihex2b(char * infile, FILE * inf,
|
|||
|
||||
} /* while */
|
||||
|
||||
fprintf(stderr,
|
||||
"%s: WARNING: no end of file record found for Intel Hex "
|
||||
"file \"%s\"\n",
|
||||
progname, infile);
|
||||
if (maxaddr == 0) {
|
||||
fprintf(stderr,
|
||||
"%s: ERROR: No valid record found in Intel Hex "
|
||||
"file \"%s\"\n",
|
||||
progname, infile);
|
||||
|
||||
return maxaddr;
|
||||
return -1;
|
||||
}
|
||||
else {
|
||||
fprintf(stderr,
|
||||
"%s: WARNING: no end of file record found for Intel Hex "
|
||||
"file \"%s\"\n",
|
||||
progname, infile);
|
||||
|
||||
return maxaddr;
|
||||
}
|
||||
}
|
||||
|
||||
static int b2srec(unsigned char * inbuf, int bufsize,
|
||||
|
|
Loading…
Reference in New Issue