diff --git a/channels/urbdrc/client/libusb/libusb_udevman.c b/channels/urbdrc/client/libusb/libusb_udevman.c index 8e51041b2..f69380b46 100644 --- a/channels/urbdrc/client/libusb/libusb_udevman.c +++ b/channels/urbdrc/client/libusb/libusb_udevman.c @@ -74,8 +74,8 @@ struct _UDEVMAN IUDEVICE* head; /* head device in linked list */ IUDEVICE* tail; /* tail device in linked list */ - LPSTR devices_vid_pid; - LPSTR devices_addr; + LPCSTR devices_vid_pid; + LPCSTR devices_addr; wArrayList* hotplug_vid_pids; UINT16 flags; UINT32 device_num; @@ -717,7 +717,7 @@ static BOOL urbdrc_udevman_register_devices(UDEVMAN* udevman, const char* device static UINT urbdrc_udevman_parse_addin_args(UDEVMAN* udevman, const ADDIN_ARGV* args) { int x; - LPSTR devices = NULL; + LPCSTR devices = NULL; for (x = 0; x < args->argc; x++) { diff --git a/client/common/file.c b/client/common/file.c index 8f09643d3..7d394e924 100644 --- a/client/common/file.c +++ b/client/common/file.c @@ -2042,10 +2042,10 @@ BOOL freerdp_client_populate_settings_from_rdp_file(rdpFile* file, rdpSettings* } for (x = 0; x < count; x++) { - UINT32 val; + unsigned long val; errno = 0; val = strtoul(args[x], NULL, 0); - if ((val == ULONG_MAX) && (errno != 0)) + if ((val >= UINT32_MAX) && (errno != 0)) { free(args); free(list); diff --git a/client/common/test/TestClientRdpFile.c b/client/common/test/TestClientRdpFile.c index f15c69a70..271c86bd2 100644 --- a/client/common/test/TestClientRdpFile.c +++ b/client/common/test/TestClientRdpFile.c @@ -162,7 +162,7 @@ static const BYTE testRdpFileUTF16[] = { 0x65, 0x00, 0x0d, 0x00, 0x0a, 0x00 }; -const static char* camera_args[] = { "rdpecam", +static const char* camera_args[] = { "rdpecam", "device:*", "device:\\?\\usb#vid_0bda&pid_58b0&mi", "device:-\\?\\usb#vid_0bdc&pid_58b1&mi", @@ -170,7 +170,7 @@ const static char* camera_args[] = { "rdpecam", "quality:2" }; #if defined(CHANNEL_URBDRC_CLIENT) -const static char* urbdrc_args[] = { "urbdrc", "device:*", "device:USBInstanceID:someid", +static const char* urbdrc_args[] = { "urbdrc", "device:*", "device:USBInstanceID:someid", "device:{72631e54-78a4-11d0-bcf7-00aa00b7b32a}" }; #endif