From acd2aa6417b6db4837355ed073ecd31a324bb321 Mon Sep 17 00:00:00 2001 From: Joerg Wunsch Date: Wed, 16 Sep 2020 21:13:24 +0000 Subject: [PATCH] Use correct pmg->type field in WIN32 implementation Submitted by Adrian Klieber patch #9820: Fix some out-of-bounds/uninitialized issues git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1439 81a1dc3b-b13d-400b-aceb-764788c761c2 --- pickit2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pickit2.c b/pickit2.c index bbf8b9ad..af867097 100644 --- a/pickit2.c +++ b/pickit2.c @@ -202,10 +202,10 @@ static int pickit2_open(PROGRAMMER * pgm, char * port) HidD_GetProductString(PDATA(pgm)->usb_handle, buff, PGM_DESCLEN-1); // convert from wide chars, but do not overwrite trailing '\0' - memset(&(pgm->type), 0, PGM_DESCLEN); + memset(&(pgm->desc), 0, PGM_DESCLEN); for (i = 0; i < (PGM_DESCLEN-1) && buff[i]; i++) { - pgm->type[i] = (char)buff[i]; // TODO what about little/big endian??? + pgm->desc[i] = (char)buff[i]; // TODO what about little/big endian??? } } #else