Skip to content

Commit

Permalink
[core] fix errors when providing a user driver
Browse files Browse the repository at this point in the history
* With thanks to JSB2500 for the fix suggestion
* Closes #191
* Also fix a CodeQL reported issue
  • Loading branch information
pbatard committed Sep 4, 2021
1 parent 0ed9de7 commit e1257a8
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions examples/wdi-simple.rc
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#endif

VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,4,752,0
PRODUCTVERSION 1,4,752,0
FILEVERSION 1,4,753,0
PRODUCTVERSION 1,4,753,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -25,13 +25,13 @@ BEGIN
BEGIN
VALUE "CompanyName", "akeo.ie"
VALUE "FileDescription", "WDI-Simple"
VALUE "FileVersion", "1.3.752"
VALUE "FileVersion", "1.3.753"
VALUE "InternalName", "WDI-Simple"
VALUE "LegalCopyright", "� 2010-2018 Pete Batard (LGPL v3)"
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/lesser.html"
VALUE "OriginalFilename", "wdi-simple.exe"
VALUE "ProductName", "WDI-Simple"
VALUE "ProductVersion", "1.3.752"
VALUE "ProductVersion", "1.3.753"
VALUE "Comments", "http://libwdi.akeo.ie"
END
END
Expand Down
2 changes: 1 addition & 1 deletion examples/zadig.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ WORD application_version[4];
char app_dir[MAX_PATH], driver_text[64];
char szFolderPath[MAX_PATH];
const char* driver_display_name[WDI_NB_DRIVERS] = { "WinUSB", "libusb-win32", "libusbK", "USB Serial (CDC)", "Custom (extract only)" };
const char* driver_name[WDI_NB_DRIVERS-1] = { "WinUSB", "libusb0", "libusbK", "usbser" };
const char* driver_name[WDI_NB_DRIVERS] = { "WinUSB", "libusb0", "libusbK", "usbser", "custom" };
struct wdi_options_create_list cl_options = { 0 };
struct wdi_options_prepare_driver pd_options = { 0 };
struct wdi_options_install_cert ic_options = { 0 };
Expand Down
2 changes: 1 addition & 1 deletion examples/zadig.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
#define FIELD_ORANGE RGB(255,240,200)
#define ARROW_GREEN RGB(92,228,65)
#define ARROW_ORANGE RGB(253,143,56)
#define APP_VERSION "Zadig 2.6.752"
#define APP_VERSION "Zadig 2.6.753"

// These are used to flag end users about the driver they are going to replace
enum driver_type {
Expand Down
8 changes: 4 additions & 4 deletions examples/zadig.rc
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,8 @@ END
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,6,752,0
PRODUCTVERSION 2,6,752,0
FILEVERSION 2,6,753,0
PRODUCTVERSION 2,6,753,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -264,13 +264,13 @@ BEGIN
BEGIN
VALUE "CompanyName", "akeo.ie"
VALUE "FileDescription", "Zadig"
VALUE "FileVersion", "2.6.752"
VALUE "FileVersion", "2.6.753"
VALUE "InternalName", "Zadig"
VALUE "LegalCopyright", "� 2010-2018 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
VALUE "OriginalFilename", "zadig.exe"
VALUE "ProductName", "Zadig"
VALUE "ProductVersion", "2.6.752"
VALUE "ProductVersion", "2.6.753"
VALUE "Comments", "http://libwdi.akeo.ie"
END
END
Expand Down
2 changes: 1 addition & 1 deletion examples/zadig_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ DWORD DownloadFile(const char* url, const char* file, HWND hProgressDialog)
dprintf("Error writing file '%s': %s\n", &file[last_slash], WinInetErrorString());
goto out;
} else if (dwDownloaded != dwWritten) {
dprintf("Error writing file '%s': Only %d/%d bytes written\n", dwWritten, dwDownloaded);
dprintf("Error writing file '%s': Only %d/%d bytes written\n", &file[last_slash], dwWritten, dwDownloaded);
goto out;
}
}
Expand Down
2 changes: 1 addition & 1 deletion libwdi/embedder.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ void add_user_files(void) {
}
// Copy the fixed part of our table into our new array
for (i = 0; i < nb_embeddables_fixed; i++) {
embeddable[i].reuse_last = 0;
embeddable[i].reuse_last = embeddable_fixed[i].reuse_last;
embeddable[i].file_name = embeddable_fixed[i].file_name;
embeddable[i].extraction_subdir = embeddable_fixed[i].extraction_subdir;
}
Expand Down
8 changes: 4 additions & 4 deletions libwdi/libwdi.rc
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ END
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,4,752,0
PRODUCTVERSION 1,4,752,0
FILEVERSION 1,4,753,0
PRODUCTVERSION 1,4,753,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -68,13 +68,13 @@ BEGIN
BEGIN
VALUE "CompanyName", "akeo.ie"
VALUE "FileDescription", "libwdi: Windows Driver Installer Library"
VALUE "FileVersion", "1.3.752"
VALUE "FileVersion", "1.3.753"
VALUE "InternalName", "libwdi"
VALUE "LegalCopyright", "� 2010-2017 Pete Batard (LGPL v3)"
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/lesser.html"
VALUE "OriginalFilename", "libwdi"
VALUE "ProductName", "libwdi"
VALUE "ProductVersion", "1.3.752"
VALUE "ProductVersion", "1.3.753"
VALUE "Comments", "http://libwdi.akeo.ie"
END
END
Expand Down

0 comments on commit e1257a8

Please sign in to comment.