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
088ae8196a
commit
51da59044e
|
@ -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>
|
2013-09-02 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
|
||||||
|
|
||||||
Submitted by Claus-Justus Heine:
|
Submitted by Claus-Justus Heine:
|
||||||
|
|
2
NEWS
2
NEWS
|
@ -82,6 +82,8 @@ Current:
|
||||||
is enabled AND target has a very slow clock
|
is enabled AND target has a very slow clock
|
||||||
- bug #39893: Verification failure with AVRISPmkII and Xmega
|
- bug #39893: Verification failure with AVRISPmkII and Xmega
|
||||||
- bug #38713: Compilation of the documentation breaks with texinfo-5
|
- 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
|
* Keep track of input file contents
|
||||||
|
|
||||||
|
|
10
fileio.c
10
fileio.c
|
@ -372,12 +372,22 @@ static int ihex2b(char * infile, FILE * inf,
|
||||||
|
|
||||||
} /* while */
|
} /* 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,
|
fprintf(stderr,
|
||||||
"%s: WARNING: no end of file record found for Intel Hex "
|
"%s: WARNING: no end of file record found for Intel Hex "
|
||||||
"file \"%s\"\n",
|
"file \"%s\"\n",
|
||||||
progname, infile);
|
progname, infile);
|
||||||
|
|
||||||
return maxaddr;
|
return maxaddr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int b2srec(unsigned char * inbuf, int bufsize,
|
static int b2srec(unsigned char * inbuf, int bufsize,
|
||||||
|
|
Loading…
Reference in New Issue