mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-09-27 22:45:27 +00:00
Check whether serial_serno is not NULL before calling it.
For devices connected through a real serial device rather than USB, there is no transport-layer serial number available. stk500v2.c (and jtag3.c) tried to always call this function. Closes #1254
This commit is contained in:
1
NEWS
1
NEWS
@@ -122,6 +122,7 @@ Changes since version 7.0:
|
||||
- megaAVR JTAG programming doesn't work for SNAP and PICkit4
|
||||
#1052
|
||||
- urclock/FTDI communication issues #1245
|
||||
- stk500v2.c dumps core on open #1254
|
||||
|
||||
* Pull requests:
|
||||
|
||||
|
@@ -1570,6 +1570,7 @@ int jtag3_open_common(PROGRAMMER *pgm, const char *port) {
|
||||
}
|
||||
|
||||
// Get USB serial number
|
||||
if (serial_serno)
|
||||
pgm->usbsn = serial_serno();
|
||||
|
||||
/*
|
||||
|
@@ -1579,6 +1579,7 @@ static int stk500v2_open(PROGRAMMER *pgm, const char *port) {
|
||||
}
|
||||
|
||||
// Get USB serial number
|
||||
if (serial_serno)
|
||||
pgm->usbsn = serial_serno();
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user