Merge pull request #4055 from akallabeth/talos_v3
Security fixes and code cleanups
This commit is contained in:
commit
1648deb435
@ -1,5 +1,5 @@
|
||||
#ifndef _FREERDP_BUILD_FLAGS_H
|
||||
#define _FREERDP_BUILD_FLAGS_H
|
||||
#ifndef FREERDP_BUILD_FLAGS_H
|
||||
#define FREERDP_BUILD_FLAGS_H
|
||||
|
||||
#define CFLAGS "${CMAKE_C_FLAGS}"
|
||||
#define COMPILER_ID "${CMAKE_C_COMPILER_ID}"
|
||||
@ -8,4 +8,4 @@
|
||||
#define BUILD_CONFIG "${FREERDP_BUILD_CONFIG}"
|
||||
#define BUILD_TYPE "${CMAKE_BUILD_TYPE}"
|
||||
|
||||
#endif /*_FREERDP_BUILD_FLAGS_H */
|
||||
#endif /* FREERDP_BUILD_FLAGS_H */
|
||||
|
@ -229,7 +229,7 @@ static void* audin_alsa_thread_func(void* arg)
|
||||
DWORD status;
|
||||
DEBUG_DVC("in");
|
||||
rbytes_per_frame = alsa->actual_channels * alsa->bytes_per_channel;
|
||||
buffer = (BYTE*) calloc(1, rbytes_per_frame * alsa->frames_per_packet);
|
||||
buffer = (BYTE*) calloc(alsa->frames_per_packet, rbytes_per_frame);
|
||||
|
||||
if (!buffer)
|
||||
{
|
||||
@ -410,7 +410,7 @@ static UINT audin_alsa_open(IAudinDevice* device, AudinReceive receive,
|
||||
alsa->receive = receive;
|
||||
alsa->user_data = user_data;
|
||||
tbytes_per_frame = alsa->target_channels * alsa->bytes_per_channel;
|
||||
alsa->buffer = (BYTE*) calloc(1, tbytes_per_frame * alsa->frames_per_packet);
|
||||
alsa->buffer = (BYTE*) calloc(alsa->frames_per_packet, tbytes_per_frame);
|
||||
|
||||
if (!alsa->buffer)
|
||||
{
|
||||
|
@ -164,7 +164,7 @@ static UINT audin_process_formats(IWTSVirtualChannelCallback* pChannelCallback,
|
||||
}
|
||||
|
||||
Stream_Seek_UINT32(s); /* cbSizeFormatsPacket */
|
||||
callback->formats = (audinFormat*) calloc(1, NumFormats * sizeof(audinFormat));
|
||||
callback->formats = (audinFormat*) calloc(NumFormats, sizeof(audinFormat));
|
||||
|
||||
if (!callback->formats)
|
||||
{
|
||||
|
@ -17,8 +17,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef FREERDP_AUDIN_CLIENT_MAIN_H
|
||||
#define FREERDP_AUDIN_CLIENT_MAIN_H
|
||||
#ifndef FREERDP_CHANNEL_AUDIN_CLIENT_MAIN_H
|
||||
#define FREERDP_CHANNEL_AUDIN_CLIENT_MAIN_H
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
@ -38,5 +38,5 @@
|
||||
#define DEBUG_DVC(...) do { } while (0)
|
||||
#endif
|
||||
|
||||
#endif /* FREERDP_AUDIN_CLIENT_MAIN_H */
|
||||
#endif /* FREERDP_CHANNEL_AUDIN_CLIENT_MAIN_H */
|
||||
|
||||
|
@ -253,7 +253,7 @@ OPENSL_STREAM* android_OpenRecDevice(char* name, int sr, int inchannels,
|
||||
int bufferframes, int bits_per_sample)
|
||||
{
|
||||
OPENSL_STREAM* p;
|
||||
p = (OPENSL_STREAM*) calloc(sizeof(OPENSL_STREAM), 1);
|
||||
p = (OPENSL_STREAM*) calloc(1, sizeof(OPENSL_STREAM));
|
||||
|
||||
if (!p)
|
||||
return NULL;
|
||||
|
@ -27,8 +27,8 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef OPENSL_IO
|
||||
#define OPENSL_IO
|
||||
#ifndef FREERDP_CHANNEL_AUDIN_CLIENT_OPENSL_IO_H
|
||||
#define FREERDP_CHANNEL_AUDIN_CLIENT_OPENSL_IO_H
|
||||
|
||||
#include <SLES/OpenSLES.h>
|
||||
#include <SLES/OpenSLES_Android.h>
|
||||
@ -93,4 +93,4 @@ FREERDP_LOCAL int android_RecIn(OPENSL_STREAM* p, short* buffer, int size);
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif // #ifndef OPENSL_IO
|
||||
#endif /* FREERDP_CHANNEL_AUDIN_CLIENT_OPENSL_IO_H */
|
||||
|
@ -496,7 +496,7 @@ static UINT audin_pulse_open(IAudinDevice* device, AudinReceive receive, void* u
|
||||
|
||||
pa_threaded_mainloop_unlock(pulse->mainloop);
|
||||
freerdp_dsp_context_reset_adpcm(pulse->dsp_context);
|
||||
pulse->buffer = calloc(1, pulse->bytes_per_frame * pulse->frames_per_packet);
|
||||
pulse->buffer = calloc(pulse->frames_per_packet, pulse->bytes_per_frame);
|
||||
|
||||
if (!pulse->buffer)
|
||||
{
|
||||
|
@ -93,7 +93,7 @@ FREERDP_ADDIN** freerdp_channels_list_client_static_addins(LPSTR pszName, LPSTR
|
||||
FREERDP_ADDIN** ppAddins = NULL;
|
||||
STATIC_SUBSYSTEM_ENTRY* subsystems;
|
||||
nAddins = 0;
|
||||
ppAddins = (FREERDP_ADDIN**) calloc(1, sizeof(FREERDP_ADDIN*) * 128);
|
||||
ppAddins = (FREERDP_ADDIN**) calloc(128, sizeof(FREERDP_ADDIN*));
|
||||
|
||||
if (!ppAddins)
|
||||
{
|
||||
@ -216,7 +216,7 @@ FREERDP_ADDIN** freerdp_channels_list_dynamic_addins(LPSTR pszName, LPSTR pszSub
|
||||
hFind = FindFirstFileA(pszSearchPath, &FindData);
|
||||
free(pszSearchPath);
|
||||
nAddins = 0;
|
||||
ppAddins = (FREERDP_ADDIN**) calloc(1, sizeof(FREERDP_ADDIN*) * 128);
|
||||
ppAddins = (FREERDP_ADDIN**) calloc(128, sizeof(FREERDP_ADDIN*));
|
||||
|
||||
if (!ppAddins)
|
||||
{
|
||||
|
@ -20,12 +20,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __CLIPRDR_FORMAT_H
|
||||
#define __CLIPRDR_FORMAT_H
|
||||
#ifndef FREERDP_CHANNEL_CLIPRDR_CLIENT_FORMAT_H
|
||||
#define FREERDP_CHANNEL_CLIPRDR_CLIENT_FORMAT_H
|
||||
|
||||
UINT cliprdr_process_format_list(cliprdrPlugin* cliprdr, wStream* s, UINT32 dataLen, UINT16 msgFlags);
|
||||
UINT cliprdr_process_format_list_response(cliprdrPlugin* cliprdr, wStream* s, UINT32 dataLen, UINT16 msgFlags);
|
||||
UINT cliprdr_process_format_data_request(cliprdrPlugin* cliprdr, wStream* s, UINT32 dataLen, UINT16 msgFlags);
|
||||
UINT cliprdr_process_format_data_response(cliprdrPlugin* cliprdr, wStream* s, UINT32 dataLen, UINT16 msgFlags);
|
||||
|
||||
#endif /* __CLIPRDR_FORMAT_H */
|
||||
#endif /* FREERDP_CHANNEL_CLIPRDR_CLIENT_FORMAT_H */
|
||||
|
@ -19,8 +19,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __CLIPRDR_MAIN_H
|
||||
#define __CLIPRDR_MAIN_H
|
||||
#ifndef FREERDP_CHANNEL_CLIPRDR_CLIENT_MAIN_H
|
||||
#define FREERDP_CHANNEL_CLIPRDR_CLIENT_MAIN_H
|
||||
|
||||
#include <winpr/stream.h>
|
||||
|
||||
@ -60,4 +60,4 @@ CliprdrClientContext* cliprdr_get_client_interface(cliprdrPlugin* cliprdr);
|
||||
#define DEBUG_CLIPRDR(...) do { } while (0)
|
||||
#endif
|
||||
|
||||
#endif /* __CLIPRDR_MAIN_H */
|
||||
#endif /* FREERDP_CHANNEL_CLIPRDR_CLIENT_MAIN_H */
|
||||
|
@ -17,8 +17,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef FREERDP_CHANNEL_SERVER_CLIPRDR_MAIN_H
|
||||
#define FREERDP_CHANNEL_SERVER_CLIPRDR_MAIN_H
|
||||
#ifndef FREERDP_CHANNEL_CLIPRDR_SERVER_MAIN_H
|
||||
#define FREERDP_CHANNEL_CLIPRDR_SERVER_MAIN_H
|
||||
|
||||
#include <winpr/crt.h>
|
||||
#include <winpr/synch.h>
|
||||
@ -45,4 +45,4 @@ struct _cliprdr_server_private
|
||||
};
|
||||
typedef struct _cliprdr_server_private CliprdrServerPrivate;
|
||||
|
||||
#endif /* FREERDP_CHANNEL_SERVER_CLIPRDR_MAIN_H */
|
||||
#endif /* FREERDP_CHANNEL_CLIPRDR_SERVER_MAIN_H */
|
||||
|
@ -19,8 +19,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __DRDYNVC_MAIN_H
|
||||
#define __DRDYNVC_MAIN_H
|
||||
#ifndef FREERDP_CHANNEL_DRDYNVC_CLIENT_MAIN_H
|
||||
#define FREERDP_CHANNEL_DRDYNVC_CLIENT_MAIN_H
|
||||
|
||||
#include <winpr/wlog.h>
|
||||
#include <winpr/synch.h>
|
||||
@ -137,4 +137,4 @@ struct drdynvc_plugin
|
||||
IWTSVirtualChannelManager* channel_mgr;
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif /* FREERDP_CHANNEL_DRDYNVC_CLIENT_MAIN_H */
|
||||
|
@ -17,8 +17,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef FREERDP_CHANNEL_SERVER_DRDYNVC_MAIN_H
|
||||
#define FREERDP_CHANNEL_SERVER_DRDYNVC_MAIN_H
|
||||
#ifndef FREERDP_CHANNEL_DRDYNVC_SERVER_MAIN_H
|
||||
#define FREERDP_CHANNEL_DRDYNVC_SERVER_MAIN_H
|
||||
|
||||
#include <winpr/crt.h>
|
||||
#include <winpr/synch.h>
|
||||
@ -34,4 +34,4 @@ struct _drdynvc_server_private
|
||||
void* ChannelHandle;
|
||||
};
|
||||
|
||||
#endif /* FREERDP_CHANNEL_SERVER_DRDYNVC_MAIN_H */
|
||||
#endif /* FREERDP_CHANNEL_DRDYNVC_SERVER_MAIN_H */
|
||||
|
@ -23,8 +23,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef FREERDP_CHANNEL_DRIVE_FILE_H
|
||||
#define FREERDP_CHANNEL_DRIVE_FILE_H
|
||||
#ifndef FREERDP_CHANNEL_DRIVE_CLIENT_FILE_H
|
||||
#define FREERDP_CHANNEL_DRIVE_CLIENT_FILE_H
|
||||
|
||||
#include <winpr/stream.h>
|
||||
#include <freerdp/channels/log.h>
|
||||
@ -68,4 +68,4 @@ BOOL drive_file_query_directory(DRIVE_FILE* file, UINT32 FsInformationClass, BYT
|
||||
|
||||
extern UINT sys_code_page;
|
||||
|
||||
#endif /* FREERDP_CHANNEL_DRIVE_FILE_H */
|
||||
#endif /* FREERDP_CHANNEL_DRIVE_CLIENT_FILE_H */
|
||||
|
@ -735,6 +735,19 @@ static UINT drive_irp_request(DEVICE* device, IRP* irp)
|
||||
return CHANNEL_RC_OK;
|
||||
}
|
||||
|
||||
static void drive_free_resources(DRIVE_DEVICE* drive)
|
||||
{
|
||||
if (!drive)
|
||||
return;
|
||||
|
||||
CloseHandle(drive->thread);
|
||||
ListDictionary_Free(drive->files);
|
||||
MessageQueue_Free(drive->IrpQueue);
|
||||
Stream_Free(drive->device.data, TRUE);
|
||||
free(drive->path);
|
||||
free(drive);
|
||||
}
|
||||
|
||||
/**
|
||||
* Function description
|
||||
*
|
||||
@ -753,12 +766,7 @@ static UINT drive_free(DEVICE* device)
|
||||
return error;
|
||||
}
|
||||
|
||||
CloseHandle(drive->thread);
|
||||
ListDictionary_Free(drive->files);
|
||||
MessageQueue_Free(drive->IrpQueue);
|
||||
Stream_Free(drive->device.data, TRUE);
|
||||
free(drive->path);
|
||||
free(drive);
|
||||
drive_free_resources(drive);
|
||||
return error;
|
||||
}
|
||||
|
||||
@ -866,7 +874,7 @@ UINT drive_register_drive_path(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints,
|
||||
|
||||
return CHANNEL_RC_OK;
|
||||
out_error:
|
||||
drive_free((DEVICE*) drive);
|
||||
drive_free_resources(drive);
|
||||
return error;
|
||||
}
|
||||
|
||||
|
@ -17,8 +17,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __ECHO_MAIN_H
|
||||
#define __ECHO_MAIN_H
|
||||
#ifndef FREERDP_CHANNEL_ECHO_CLIENT_MAIN_H
|
||||
#define FREERDP_CHANNEL_ECHO_CLIENT_MAIN_H
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
@ -36,5 +36,5 @@
|
||||
#define DEBUG_DVC(...) do { } while (0)
|
||||
#endif
|
||||
|
||||
#endif /* __ECHO_MAIN_H */
|
||||
#endif /* FREERDP_CHANNEL_ECHO_CLIENT_MAIN_H */
|
||||
|
||||
|
@ -17,8 +17,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef FREERDP_CHANNEL_SERVER_ENCOMSP_MAIN_H
|
||||
#define FREERDP_CHANNEL_SERVER_ENCOMSP_MAIN_H
|
||||
#ifndef FREERDP_CHANNEL_ENCOMSP_SERVER_MAIN_H
|
||||
#define FREERDP_CHANNEL_ENCOMSP_SERVER_MAIN_H
|
||||
|
||||
#include <winpr/crt.h>
|
||||
#include <winpr/synch.h>
|
||||
@ -33,4 +33,4 @@ struct _encomsp_server_private
|
||||
void* ChannelHandle;
|
||||
};
|
||||
|
||||
#endif /* FREERDP_CHANNEL_SERVER_ENCOMSP_MAIN_H */
|
||||
#endif /* FREERDP_CHANNEL_ENCOMSP_SERVER_MAIN_H */
|
||||
|
@ -281,7 +281,7 @@ static rdpPrinter** printer_cups_enum_printers(rdpPrinterDriver* driver)
|
||||
int i;
|
||||
|
||||
num_dests = cupsGetDests(&dests);
|
||||
printers = (rdpPrinter**) calloc(1, sizeof(rdpPrinter*) * (num_dests + 1));
|
||||
printers = (rdpPrinter**) calloc(num_dests + 1, sizeof(rdpPrinter*));
|
||||
if (!printers)
|
||||
return NULL;
|
||||
|
||||
|
@ -17,12 +17,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __PRINTER_CUPS_H
|
||||
#define __PRINTER_CUPS_H
|
||||
#ifndef FREERDP_CHANNEL_PRINTER_CLIENT_CUPS_H
|
||||
#define FREERDP_CHANNEL_PRINTER_CLIENT_CUPS_H
|
||||
|
||||
#include "printer_main.h"
|
||||
|
||||
rdpPrinterDriver* printer_cups_get_driver(void);
|
||||
|
||||
#endif
|
||||
#endif /* FREERDP_CHANNEL_PRINTER_CLIENT_CUPS_H */
|
||||
|
||||
|
@ -20,8 +20,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __PRINTER_MAIN_H
|
||||
#define __PRINTER_MAIN_H
|
||||
#ifndef FREERDP_CHANNEL_PRINTER_CLIENT_MAIN_H
|
||||
#define FREERDP_CHANNEL_PRINTER_CLIENT_MAIN_H
|
||||
|
||||
#include <freerdp/channels/rdpdr.h>
|
||||
|
||||
@ -66,4 +66,4 @@ struct rdp_print_job
|
||||
pcClosePrintJob Close;
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif /* FREERDP_CHANNEL_PRINTER_CLIENT_MAIN_H */
|
||||
|
@ -17,8 +17,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __PRINTER_WIN_H
|
||||
#define __PRINTER_WIN_H
|
||||
#ifndef FREERDP_CHANNEL_PRINTER_CLIENT_WIN_H
|
||||
#define FREERDP_CHANNEL_PRINTER_CLIENT_WIN_H
|
||||
|
||||
#include <freerdp/channels/log.h>
|
||||
|
||||
@ -31,5 +31,5 @@ rdpPrinterDriver* printer_win_get_driver(void);
|
||||
#define DEBUG_WINPR(...) do { } while (0)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif /* FREERDP_CHANNEL_PRINTER_CLIENT_WIN_H */
|
||||
|
||||
|
@ -17,8 +17,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __CHANNELS_PRINTER_PRINTER_H_
|
||||
#define __CHANNELS_PRINTER_PRINTER_H_
|
||||
#ifndef FREERDP_CHANNEL_PRINTER_PRINTER_H
|
||||
#define FREERDP_CHANNEL_PRINTER_PRINTER_H
|
||||
|
||||
/* SERVER_PRINTER_CACHE_EVENT.cachedata */
|
||||
#define RDPDR_ADD_PRINTER_EVENT 0x00000001
|
||||
@ -34,4 +34,4 @@
|
||||
#define RDPDR_PRINTER_ANNOUNCE_FLAG_XPSFORMAT 0x00000010
|
||||
|
||||
|
||||
#endif /* __CHANNELS_PRINTER_PRINTER_H_ */
|
||||
#endif /* FREERDP_CHANNEL_PRINTER_PRINTER_H */
|
||||
|
@ -21,8 +21,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef FREERDP_CHANNEL_CLIENT_RAIL_MAIN_H
|
||||
#define FREERDP_CHANNEL_CLIENT_RAIL_MAIN_H
|
||||
#ifndef FREERDP_CHANNEL_RAIL_CLIENT_MAIN_H
|
||||
#define FREERDP_CHANNEL_RAIL_CLIENT_MAIN_H
|
||||
|
||||
#include <freerdp/rail.h>
|
||||
#include <freerdp/svc.h>
|
||||
@ -56,4 +56,4 @@ typedef struct rail_plugin railPlugin;
|
||||
RailClientContext* rail_get_client_interface(railPlugin* rail);
|
||||
UINT rail_send_channel_data(railPlugin* rail, void* data, size_t length);
|
||||
|
||||
#endif /* FREERDP_CHANNEL_CLIENT_RAIL_MAIN_H */
|
||||
#endif /* FREERDP_CHANNEL_RAIL_CLIENT_MAIN_H */
|
||||
|
@ -20,8 +20,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __RAIL_ORDERS_H
|
||||
#define __RAIL_ORDERS_H
|
||||
#ifndef FREERDP_CHANNEL_RAIL_CLIENT_ORDERS_H
|
||||
#define FREERDP_CHANNEL_RAIL_CLIENT_ORDERS_H
|
||||
|
||||
#include <freerdp/channels/log.h>
|
||||
|
||||
@ -64,4 +64,4 @@ UINT rail_send_client_window_move_order(railPlugin* rail, RAIL_WINDOW_MOVE_ORDER
|
||||
UINT rail_send_client_get_appid_req_order(railPlugin* rail, RAIL_GET_APPID_REQ_ORDER* getAppIdReq);
|
||||
UINT rail_send_client_langbar_info_order(railPlugin* rail, RAIL_LANGBAR_INFO_ORDER* langBarInfo);
|
||||
|
||||
#endif /* __RAIL_ORDERS_H */
|
||||
#endif /* FREERDP_CHANNEL_RAIL_CLIENT_ORDERS_H */
|
||||
|
@ -20,8 +20,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef FREERDP_CHANNEL_SERVER_RDPDR_MAIN_H
|
||||
#define FREERDP_CHANNEL_SERVER_RDPDR_MAIN_H
|
||||
#ifndef FREERDP_CHANNEL_RDPDR_SERVER_MAIN_H
|
||||
#define FREERDP_CHANNEL_RDPDR_SERVER_MAIN_H
|
||||
|
||||
#include <winpr/collections.h>
|
||||
#include <winpr/crt.h>
|
||||
@ -86,4 +86,4 @@ struct _RDPDR_IRP
|
||||
};
|
||||
typedef struct _RDPDR_IRP RDPDR_IRP;
|
||||
|
||||
#endif /* FREERDP_CHANNEL_SERVER_RDPDR_MAIN_H */
|
||||
#endif /* FREERDP_CHANNEL_RDPDR_SERVER_MAIN_H */
|
||||
|
@ -19,8 +19,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __FREERDP_CHANNEL_SERVER_RDPEI_MAIN_H_
|
||||
#define __FREERDP_CHANNEL_SERVER_RDPEI_MAIN_H_
|
||||
#ifndef FREERDP_CHANNEL_RDPEI_SERVER_MAIN_H
|
||||
#define FREERDP_CHANNEL_RDPEI_SERVER_MAIN_H
|
||||
|
||||
#include <winpr/crt.h>
|
||||
#include <winpr/synch.h>
|
||||
@ -31,5 +31,5 @@
|
||||
|
||||
|
||||
|
||||
#endif /* FREERDP_CHANNEL_SERVER_RDPEI_MAIN_H_ */
|
||||
#endif /* FREERDP_CHANNEL_RDPEI_SERVER_MAIN_H */
|
||||
|
||||
|
@ -63,7 +63,7 @@ static UINT rdpgfx_read_h264_metablock(RDPGFX_PLUGIN* gfx, wStream* s,
|
||||
goto error_out;
|
||||
}
|
||||
|
||||
meta->regionRects = (RECTANGLE_16*) malloc(meta->numRegionRects * sizeof(RECTANGLE_16));
|
||||
meta->regionRects = (RECTANGLE_16*) calloc(meta->numRegionRects, sizeof(RECTANGLE_16));
|
||||
|
||||
if (!meta->regionRects)
|
||||
{
|
||||
@ -72,7 +72,7 @@ static UINT rdpgfx_read_h264_metablock(RDPGFX_PLUGIN* gfx, wStream* s,
|
||||
goto error_out;
|
||||
}
|
||||
|
||||
meta->quantQualityVals = (RDPGFX_H264_QUANT_QUALITY*) malloc(meta->numRegionRects * sizeof(
|
||||
meta->quantQualityVals = (RDPGFX_H264_QUANT_QUALITY*) calloc(meta->numRegionRects, sizeof(
|
||||
RDPGFX_H264_QUANT_QUALITY));
|
||||
|
||||
if (!meta->quantQualityVals)
|
||||
@ -182,8 +182,9 @@ static UINT rdpgfx_decode_AVC444(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd
|
||||
UINT32 tmp;
|
||||
size_t pos1, pos2;
|
||||
wStream* s;
|
||||
RDPGFX_AVC444_BITMAP_STREAM h264;
|
||||
RDPGFX_AVC444_BITMAP_STREAM h264 = { 0 };
|
||||
RdpgfxClientContext* context = (RdpgfxClientContext*) gfx->iface.pInterface;
|
||||
|
||||
s = Stream_New(cmd->data, cmd->length);
|
||||
|
||||
if (!s)
|
||||
@ -193,21 +194,26 @@ static UINT rdpgfx_decode_AVC444(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd
|
||||
}
|
||||
|
||||
if (Stream_GetRemainingLength(s) < 4)
|
||||
return ERROR_INVALID_DATA;
|
||||
|
||||
{
|
||||
error = ERROR_INVALID_DATA;
|
||||
goto fail;
|
||||
}
|
||||
Stream_Read_UINT32(s, tmp);
|
||||
h264.cbAvc420EncodedBitstream1 = tmp & 0x3FFFFFFFUL;
|
||||
h264.LC = (tmp >> 30UL) & 0x03UL;
|
||||
|
||||
if (h264.LC == 0x03)
|
||||
return ERROR_INVALID_DATA;
|
||||
{
|
||||
error = ERROR_INVALID_DATA;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
pos1 = Stream_GetPosition(s);
|
||||
|
||||
if ((error = rdpgfx_read_h264_metablock(gfx, s, &(h264.bitstream[0].meta))))
|
||||
{
|
||||
WLog_ERR(TAG, "rdpgfx_read_h264_metablock failed with error %"PRIu32"!", error);
|
||||
return error;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
pos2 = Stream_GetPosition(s);
|
||||
@ -218,7 +224,10 @@ static UINT rdpgfx_decode_AVC444(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd
|
||||
tmp = h264.cbAvc420EncodedBitstream1 - pos2 + pos1;
|
||||
|
||||
if (Stream_GetRemainingLength(s) < tmp)
|
||||
return ERROR_INVALID_DATA;
|
||||
{
|
||||
error = ERROR_INVALID_DATA;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
h264.bitstream[0].length = tmp;
|
||||
Stream_Seek(s, tmp);
|
||||
@ -226,7 +235,7 @@ static UINT rdpgfx_decode_AVC444(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd
|
||||
if ((error = rdpgfx_read_h264_metablock(gfx, s, &(h264.bitstream[1].meta))))
|
||||
{
|
||||
WLog_ERR(TAG, "rdpgfx_read_h264_metablock failed with error %"PRIu32"!", error);
|
||||
return error;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
h264.bitstream[1].data = Stream_Pointer(s);
|
||||
@ -238,7 +247,6 @@ static UINT rdpgfx_decode_AVC444(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd
|
||||
memset(&h264.bitstream[1], 0, sizeof(h264.bitstream[1]));
|
||||
}
|
||||
|
||||
Stream_Free(s, FALSE);
|
||||
cmd->extra = (void*) &h264;
|
||||
|
||||
if (context)
|
||||
@ -249,6 +257,8 @@ static UINT rdpgfx_decode_AVC444(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd
|
||||
WLog_ERR(TAG, "context->SurfaceCommand failed with error %"PRIu32"", error);
|
||||
}
|
||||
|
||||
fail:
|
||||
Stream_Free(s, FALSE);
|
||||
free(h264.bitstream[0].meta.regionRects);
|
||||
free(h264.bitstream[0].meta.quantQualityVals);
|
||||
free(h264.bitstream[1].meta.regionRects);
|
||||
|
@ -1593,7 +1593,7 @@ static UINT rdpgfx_get_surface_ids(RdpgfxClientContext* context,
|
||||
return CHANNEL_RC_OK;
|
||||
}
|
||||
|
||||
pSurfaceIds = (UINT16*) malloc(count * sizeof(UINT16));
|
||||
pSurfaceIds = (UINT16*) calloc(count, sizeof(UINT16));
|
||||
|
||||
if (!pSurfaceIds)
|
||||
{
|
||||
|
@ -19,8 +19,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef FREERDP_CHANNEL_RDPGFX_CLIENT_COMMON_H
|
||||
#define FREERDP_CHANNEL_RDPGFX_CLIENT_COMMON_H
|
||||
#ifndef FREERDP_CHANNEL_RDPGFX_COMMON_H
|
||||
#define FREERDP_CHANNEL_RDPGFX_COMMON_H
|
||||
|
||||
#include <winpr/crt.h>
|
||||
#include <winpr/stream.h>
|
||||
@ -43,5 +43,5 @@ FREERDP_LOCAL UINT rdpgfx_write_rect16(wStream* s, RECTANGLE_16* rect16);
|
||||
FREERDP_LOCAL UINT rdpgfx_read_color32(wStream* s, RDPGFX_COLOR32* color32);
|
||||
FREERDP_LOCAL UINT rdpgfx_write_color32(wStream* s, RDPGFX_COLOR32* color32);
|
||||
|
||||
#endif /* FREERDP_CHANNEL_RDPGFX_CLIENT_COMMON_H */
|
||||
#endif /* FREERDP_CHANNEL_RDPGFX_COMMON_H */
|
||||
|
||||
|
@ -264,7 +264,7 @@ OPENSL_STREAM* android_OpenAudioDevice(int sr, int outchannels,
|
||||
int bufferframes)
|
||||
{
|
||||
OPENSL_STREAM* p;
|
||||
p = (OPENSL_STREAM*) calloc(sizeof(OPENSL_STREAM), 1);
|
||||
p = (OPENSL_STREAM*) calloc(1, sizeof(OPENSL_STREAM));
|
||||
|
||||
if (!p)
|
||||
return NULL;
|
||||
|
@ -27,8 +27,8 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef OPENSL_IO
|
||||
#define OPENSL_IO
|
||||
#ifndef FREERDP_CHANNEL_RDPSND_CLIENT_OPENSL_IO_H
|
||||
#define FREERDP_CHANNEL_RDPSND_CLIENT_OPENSL_IO_H
|
||||
|
||||
#include <SLES/OpenSLES.h>
|
||||
#include <SLES/OpenSLES_Android.h>
|
||||
@ -108,4 +108,4 @@ FREERDP_LOCAL BOOL android_SetOutputVolume(OPENSL_STREAM* p, int level);
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif // #ifndef OPENSL_IO
|
||||
#endif /* FREERDP_CHANNEL_RDPSND_CLIENT_OPENSL_IO_H */
|
||||
|
@ -223,8 +223,9 @@ static void rdpsnd_select_supported_audio_formats(rdpsndPlugin* rdpsnd)
|
||||
if (!rdpsnd->NumberOfServerFormats)
|
||||
return;
|
||||
|
||||
rdpsnd->ClientFormats = (AUDIO_FORMAT*) calloc(sizeof(AUDIO_FORMAT),
|
||||
rdpsnd->NumberOfServerFormats);
|
||||
rdpsnd->ClientFormats = (AUDIO_FORMAT*) calloc(
|
||||
rdpsnd->NumberOfServerFormats,
|
||||
sizeof(AUDIO_FORMAT));
|
||||
|
||||
if (!rdpsnd->ClientFormats)
|
||||
return;
|
||||
|
@ -18,8 +18,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __RDPSND_MAIN_H
|
||||
#define __RDPSND_MAIN_H
|
||||
#ifndef FREERDP_CHANNEL_RDPSND_CLIENT_MAIN_H
|
||||
#define FREERDP_CHANNEL_RDPSND_CLIENT_MAIN_H
|
||||
|
||||
#include <freerdp/api.h>
|
||||
#include <freerdp/svc.h>
|
||||
@ -37,4 +37,4 @@
|
||||
|
||||
UINT rdpsnd_virtual_channel_write(rdpsndPlugin* rdpsnd, wStream* s);
|
||||
|
||||
#endif /* __RDPSND_MAIN_H */
|
||||
#endif /* FREERDP_CHANNEL_RDPSND_CLIENT_MAIN_H */
|
||||
|
@ -18,8 +18,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef FREERDP_CHANNEL_SERVER_RDPSND_MAIN_H
|
||||
#define FREERDP_CHANNEL_SERVER_RDPSND_MAIN_H
|
||||
#ifndef FREERDP_CHANNEL_RDPSND_SERVER_MAIN_H
|
||||
#define FREERDP_CHANNEL_RDPSND_SERVER_MAIN_H
|
||||
|
||||
#include <winpr/crt.h>
|
||||
#include <winpr/synch.h>
|
||||
@ -55,4 +55,4 @@ struct _rdpsnd_server_private
|
||||
CRITICAL_SECTION lock; /* Protect out_buffer and related parameters */
|
||||
};
|
||||
|
||||
#endif /* FREERDP_CHANNEL_SERVER_RDPSND_MAIN_H */
|
||||
#endif /* FREERDP_CHANNEL_RDPSND_SERVER_MAIN_H */
|
||||
|
@ -17,8 +17,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef FREERDP_CHANNEL_SERVER_REMDESK_MAIN_H
|
||||
#define FREERDP_CHANNEL_SERVER_REMDESK_MAIN_H
|
||||
#ifndef FREERDP_CHANNEL_REMDESK_SERVER_MAIN_H
|
||||
#define FREERDP_CHANNEL_REMDESK_SERVER_MAIN_H
|
||||
|
||||
#include <winpr/crt.h>
|
||||
#include <winpr/synch.h>
|
||||
@ -38,5 +38,5 @@ struct _remdesk_server_private
|
||||
UINT32 Version;
|
||||
};
|
||||
|
||||
#endif /* FREERDP_CHANNEL_SERVER_REMDESK_MAIN_H */
|
||||
#endif /* FREERDP_CHANNEL_REMDESK_SERVER_MAIN_H */
|
||||
|
||||
|
@ -18,9 +18,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __WTSVC_H
|
||||
#define __WTSVC_H
|
||||
#ifndef FREERDP_CHANNEL_SERVER_CHANNELS_H
|
||||
#define FREERDP_CHANNEL_SERVER_CHANNELS_H
|
||||
|
||||
|
||||
|
||||
#endif /* __WTSVC_H */
|
||||
#endif /* FREERDP_CHANNEL_SERVER_CHANNELS_H */
|
||||
|
@ -981,7 +981,7 @@ LONG smartcard_unpack_connect_w_call(SMARTCARD_DEVICE* smartcard, wStream* s, Co
|
||||
Stream_Seek_UINT32(s); /* NdrMaxCount (4 bytes) */
|
||||
Stream_Seek_UINT32(s); /* NdrOffset (4 bytes) */
|
||||
Stream_Read_UINT32(s, count); /* NdrActualCount (4 bytes) */
|
||||
call->szReader = (WCHAR*) malloc((count + 1) * 2);
|
||||
call->szReader = (WCHAR*) calloc((count + 1), 2);
|
||||
|
||||
if (!call->szReader)
|
||||
{
|
||||
@ -1557,7 +1557,7 @@ LONG smartcard_unpack_get_status_change_w_call(SMARTCARD_DEVICE* smartcard, wStr
|
||||
return STATUS_BUFFER_TOO_SMALL;
|
||||
}
|
||||
|
||||
readerState->szReader = (WCHAR*) malloc((count + 1) * 2);
|
||||
readerState->szReader = (WCHAR*) calloc((count + 1), 2);
|
||||
|
||||
if (!readerState->szReader)
|
||||
{
|
||||
|
@ -19,8 +19,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef _TSMF_PLATFORM_H_
|
||||
#define _TSMF_PLATFORM_H_
|
||||
#ifndef FREERDP_CHANNEL_TSMF_CLIENT_GST_PLATFORM_H
|
||||
#define FREERDP_CHANNEL_TSMF_CLIENT_GST_PLATFORM_H
|
||||
|
||||
#include <gst/gst.h>
|
||||
#include <tsmf_decoder.h>
|
||||
@ -84,4 +84,4 @@ int tsmf_window_unmap(TSMFGstreamerDecoder* decoder);
|
||||
BOOL tsmf_gstreamer_add_pad(TSMFGstreamerDecoder* mdecoder);
|
||||
void tsmf_gstreamer_remove_pad(TSMFGstreamerDecoder* mdecoder);
|
||||
|
||||
#endif
|
||||
#endif /* FREERDP_CHANNEL_TSMF_CLIENT_GST_PLATFORM_H */
|
||||
|
@ -17,8 +17,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __TSMF_AUDIO_H
|
||||
#define __TSMF_AUDIO_H
|
||||
#ifndef FREERDP_CHANNEL_TSMF_CLIENT_AUDIO_H
|
||||
#define FREERDP_CHANNEL_TSMF_CLIENT_AUDIO_H
|
||||
|
||||
#include "tsmf_types.h"
|
||||
|
||||
@ -47,5 +47,4 @@ typedef ITSMFAudioDevice* (*TSMF_AUDIO_DEVICE_ENTRY) (void);
|
||||
|
||||
ITSMFAudioDevice* tsmf_load_audio_device(const char* name, const char* device);
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* FREERDP_CHANNEL_TSMF_CLIENT_AUDIO_H */
|
||||
|
@ -17,13 +17,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __TSMF_CODEC
|
||||
#define __TSMF_CODEC
|
||||
#ifndef FREERDP_CHANNEL_TSMF_CLIENT_CODEC_H
|
||||
#define FREERDP_CHANNEL_TSMF_CLIENT_CODEC_H
|
||||
|
||||
#include "tsmf_types.h"
|
||||
|
||||
BOOL tsmf_codec_parse_media_type(TS_AM_MEDIA_TYPE* mediatype, wStream* s);
|
||||
BOOL tsmf_codec_check_media_type(const char* decoder_name, wStream* s);
|
||||
|
||||
#endif
|
||||
#endif /* FREERDP_CHANNEL_TSMF_CLIENT_CODEC_H */
|
||||
|
||||
|
@ -18,8 +18,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __TSMF_CONSTANTS_H
|
||||
#define __TSMF_CONSTANTS_H
|
||||
#ifndef FREERDP_CHANNEL_TSMF_CLIENT_CONSTANTS_H
|
||||
#define FREERDP_CHANNEL_TSMF_CLIENT_CONSTANTS_H
|
||||
|
||||
#define GUID_SIZE 16
|
||||
#define TSMF_BUFFER_PADDING_SIZE 8
|
||||
@ -136,5 +136,4 @@
|
||||
#define TSMF_FORMAT_TYPE_VIDEOINFO2 4
|
||||
#define TSMF_FORMAT_TYPE_MPEG1VIDEOINFO 5
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* FREERDP_CHANNEL_TSMF_CLIENT_CONSTANTS_H */
|
||||
|
@ -18,8 +18,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __TSMF_DECODER_H
|
||||
#define __TSMF_DECODER_H
|
||||
#ifndef FREERDP_CHANNEL_TSMF_CLIENT_DECODER_H
|
||||
#define FREERDP_CHANNEL_TSMF_CLIENT_DECODER_H
|
||||
|
||||
#include "tsmf_types.h"
|
||||
|
||||
@ -72,5 +72,4 @@ typedef ITSMFDecoder *(*TSMF_DECODER_ENTRY)(void);
|
||||
ITSMFDecoder *tsmf_load_decoder(const char *name, TS_AM_MEDIA_TYPE *media_type);
|
||||
BOOL tsmf_check_decoder_available(const char* name);
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* FREERDP_CHANNEL_TSMF_CLIENT_DECODER_H */
|
||||
|
@ -19,8 +19,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __TSMF_IFMAN_H
|
||||
#define __TSMF_IFMAN_H
|
||||
#ifndef FREERDP_CHANNEL_TSMF_CLIENT_IFMAN_H
|
||||
#define FREERDP_CHANNEL_TSMF_CLIENT_IFMAN_H
|
||||
|
||||
#include <freerdp/freerdp.h>
|
||||
|
||||
@ -66,5 +66,5 @@ UINT tsmf_ifman_on_playback_restarted(TSMF_IFMAN* ifman);
|
||||
UINT tsmf_ifman_on_playback_stopped(TSMF_IFMAN* ifman);
|
||||
UINT tsmf_ifman_on_playback_rate_changed(TSMF_IFMAN* ifman);
|
||||
|
||||
#endif
|
||||
#endif /* FREERDP_CHANNEL_TSMF_CLIENT_IFMAN_H */
|
||||
|
||||
|
@ -19,8 +19,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __TSMF_MAIN_H
|
||||
#define __TSMF_MAIN_H
|
||||
#ifndef FREERDP_CHANNEL_TSMF_CLIENT_MAIN_H
|
||||
#define FREERDP_CHANNEL_TSMF_CLIENT_MAIN_H
|
||||
|
||||
#include <freerdp/freerdp.h>
|
||||
|
||||
@ -68,5 +68,4 @@ BOOL tsmf_send_eos_response(IWTSVirtualChannelCallback* pChannelCallback, UINT32
|
||||
BOOL tsmf_playback_ack(IWTSVirtualChannelCallback* pChannelCallback,
|
||||
UINT32 message_id, UINT64 duration, UINT32 data_size);
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* FREERDP_CHANNEL_TSMF_CLIENT_MAIN_H */
|
||||
|
@ -465,7 +465,7 @@ static BOOL tsmf_sample_playback_video(TSMF_SAMPLE* sample)
|
||||
if (presentation->nr_rects > 0)
|
||||
{
|
||||
event.numVisibleRects = presentation->nr_rects;
|
||||
event.visibleRects = (RECTANGLE_16*) calloc(1, event.numVisibleRects * sizeof(RECTANGLE_16));
|
||||
event.visibleRects = (RECTANGLE_16*) calloc(event.numVisibleRects, sizeof(RECTANGLE_16));
|
||||
|
||||
if (!event.visibleRects)
|
||||
{
|
||||
|
@ -25,8 +25,8 @@
|
||||
* streams in each presentation.
|
||||
*/
|
||||
|
||||
#ifndef __TSMF_MEDIA_H
|
||||
#define __TSMF_MEDIA_H
|
||||
#ifndef FREERDP_CHANNEL_TSMF_CLIENT_MEDIA_H
|
||||
#define FREERDP_CHANNEL_TSMF_CLIENT_MEDIA_H
|
||||
|
||||
#include <freerdp/freerdp.h>
|
||||
|
||||
@ -69,5 +69,5 @@ BOOL tsmf_stream_push_sample(TSMF_STREAM* stream, IWTSVirtualChannelCallback* pC
|
||||
BOOL tsmf_media_init(void);
|
||||
void tsmf_stream_start_threads(TSMF_STREAM* stream);
|
||||
|
||||
#endif
|
||||
#endif /* FREERDP_CHANNEL_TSMF_CLIENT_MEDIA_H */
|
||||
|
||||
|
@ -17,8 +17,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __TSMF_TYPES_H
|
||||
#define __TSMF_TYPES_H
|
||||
#ifndef FREERDP_CHANNEL_TSMF_CLIENT_TYPES_H
|
||||
#define FREERDP_CHANNEL_TSMF_CLIENT_TYPES_H
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
@ -57,5 +57,5 @@ typedef struct _TS_AM_MEDIA_TYPE
|
||||
UINT32 ExtraDataSize;
|
||||
} TS_AM_MEDIA_TYPE;
|
||||
|
||||
#endif
|
||||
#endif /* FREERDP_CHANNEL_TSMF_CLIENT_TYPES_H */
|
||||
|
||||
|
@ -18,8 +18,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __DATA_TRANSFER_H
|
||||
#define __DATA_TRANSFER_H
|
||||
#ifndef FREERDP_CHANNEL_URBDRC_CLIENT_DATA_TRANSFER_H
|
||||
#define FREERDP_CHANNEL_URBDRC_CLIENT_DATA_TRANSFER_H
|
||||
|
||||
#include "urbdrc_main.h"
|
||||
|
||||
@ -31,5 +31,5 @@
|
||||
|
||||
void *urbdrc_process_udev_data_transfer(void* arg);
|
||||
|
||||
#endif
|
||||
#endif /* FREERDP_CHANNEL_URBDRC_CLIENT_DATA_TRANSFER_H */
|
||||
|
||||
|
@ -18,8 +18,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __ISOCH_QUEUE_H
|
||||
#define __ISOCH_QUEUE_H
|
||||
#ifndef FREERDP_CHANNEL_URBDRC_CLIENT_ISOCH_QUEUE_H
|
||||
#define FREERDP_CHANNEL_URBDRC_CLIENT_ISOCH_QUEUE_H
|
||||
|
||||
#include "urbdrc_types.h"
|
||||
|
||||
@ -66,4 +66,4 @@ ISOCH_CALLBACK_QUEUE* isoch_queue_new(void);
|
||||
|
||||
|
||||
|
||||
#endif /* __ISOCH_QUEUE_H */
|
||||
#endif /* FREERDP_CHANNEL_URBDRC_CLIENT_ISOCH_QUEUE_H */
|
||||
|
@ -759,7 +759,7 @@ static MSUSB_CONFIG_DESCRIPTOR* libusb_udev_complete_msconfig_setup(IUDEVICE* id
|
||||
LibusbInterface = &LibusbConfig->interface[MsInterface->InterfaceNumber];
|
||||
LibusbAltsetting = &LibusbInterface->altsetting[MsInterface->AlternateSetting];
|
||||
LibusbNumEndpoint = LibusbAltsetting->bNumEndpoints;
|
||||
t_MsPipes = (MSUSB_PIPE_DESCRIPTOR**) malloc(LibusbNumEndpoint * sizeof(MSUSB_PIPE_DESCRIPTOR*));
|
||||
t_MsPipes = (MSUSB_PIPE_DESCRIPTOR**) calloc(LibusbNumEndpoint, sizeof(MSUSB_PIPE_DESCRIPTOR*));
|
||||
|
||||
for (pnum = 0; pnum < LibusbNumEndpoint; pnum++)
|
||||
{
|
||||
|
@ -20,8 +20,8 @@
|
||||
|
||||
|
||||
|
||||
#ifndef __LIBUSB_UDEVICE_H
|
||||
#define __LIBUSB_UDEVICE_H
|
||||
#ifndef FREERDP_CHANNEL_URBDRC_CLIENT_LIBUSB_UDEVICE_H
|
||||
#define FREERDP_CHANNEL_URBDRC_CLIENT_LIBUSB_UDEVICE_H
|
||||
|
||||
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
|
||||
#include <libusb.h>
|
||||
@ -82,4 +82,4 @@ IUDEVICE* udev_new_by_addr(int bus_number, int dev_number);
|
||||
|
||||
extern int libusb_debug;
|
||||
|
||||
#endif /* __LIBUSB_UDEVICE_H */
|
||||
#endif /* FREERDP_CHANNEL_URBDRC_CLIENT_LIBUSB_UDEVICE_H */
|
||||
|
@ -18,8 +18,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __REQUEST_QUEUE_H
|
||||
#define __REQUEST_QUEUE_H
|
||||
#ifndef FREERDP_CHANNEL_URBDRC_CLIENT_LIBUSB_REQUEST_QUEUE_H
|
||||
#define FREERDP_CHANNEL_URBDRC_CLIENT_LIBUSB_REQUEST_QUEUE_H
|
||||
|
||||
#include "urbdrc_types.h"
|
||||
|
||||
@ -62,4 +62,4 @@ struct _REQUEST_QUEUE
|
||||
REQUEST_QUEUE* request_queue_new(void);
|
||||
|
||||
|
||||
#endif /* __REQUEST_QUEUE_H */
|
||||
#endif /* FREERDP_CHANNEL_URBDRC_CLIENT_LIBUSB_REQUEST_QUEUE_H */
|
||||
|
@ -18,8 +18,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __SEACH_MAN_H
|
||||
#define __SEACH_MAN_H
|
||||
#ifndef FREERDP_CHANNEL_URBDRC_CLIENT_SEARCHMAN_H
|
||||
#define FREERDP_CHANNEL_URBDRC_CLIENT_SEARCHMAN_H
|
||||
|
||||
#include "urbdrc_types.h"
|
||||
|
||||
@ -74,5 +74,5 @@ struct _USB_SEARCHMAN
|
||||
|
||||
USB_SEARCHMAN* searchman_new(void* urbdrc, UINT32 UsbDevice);
|
||||
|
||||
#endif
|
||||
#endif /* FREERDP_CHANNEL_URBDRC_CLIENT_SEARCHMAN_H */
|
||||
|
||||
|
@ -20,8 +20,8 @@
|
||||
|
||||
|
||||
|
||||
#ifndef __URBDRC_MAIN_H
|
||||
#define __URBDRC_MAIN_H
|
||||
#ifndef FREERDP_CHANNEL_URBDRC_CLIENT_MAIN_H
|
||||
#define FREERDP_CHANNEL_URBDRC_CLIENT_MAIN_H
|
||||
|
||||
#include "searchman.h"
|
||||
#include "isoch_queue.h"
|
||||
@ -224,4 +224,4 @@ struct _IUDEVMAN
|
||||
void (*wait_urb) (IUDEVMAN* idevman);
|
||||
};
|
||||
|
||||
#endif /* __URBDRC_MAIN_H */
|
||||
#endif /* FREERDP_CHANNEL_URBDRC_CLIENT_MAIN_H */
|
||||
|
@ -18,8 +18,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __URBDRC_TYPES_H
|
||||
#define __URBDRC_TYPES_H
|
||||
#ifndef FREERDP_CHANNEL_URBDRC_CLIENT_TYPES_H
|
||||
#define FREERDP_CHANNEL_URBDRC_CLIENT_TYPES_H
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
@ -330,4 +330,4 @@ enum device_descriptor_table
|
||||
_t = (_tp.tv_sec * 1000) + (_tp.tv_usec / 1000); \
|
||||
} while (0)
|
||||
|
||||
#endif /* __URBDRC_TYPES_H */
|
||||
#endif /* FREERDP_CHANNEL_URBDRC_CLIENT_TYPES_H */
|
||||
|
@ -17,8 +17,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __ANDROID_CLIPRDR_H__
|
||||
#define __ANDROID_CLIPRDR_H__
|
||||
#ifndef FREERDP_CLIENT_ANDROID_CLIPRDR_H
|
||||
#define FREERDP_CLIENT_ANDROID_CLIPRDR_H
|
||||
|
||||
#include <freerdp/client/cliprdr.h>
|
||||
#include <freerdp/api.h>
|
||||
@ -33,4 +33,4 @@ FREERDP_LOCAL BOOL android_cliprdr_init(androidContext* afc,
|
||||
FREERDP_LOCAL BOOL android_cliprdr_uninit(androidContext* afc,
|
||||
CliprdrClientContext* cliprdr);
|
||||
|
||||
#endif /* __ANDROID_CLIPRDR_H__ */
|
||||
#endif /* FREERDP_CLIENT_ANDROID_CLIPRDR_H */
|
||||
|
@ -309,7 +309,7 @@ BOOL android_event_queue_init(freerdp* inst)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
queue->events = (ANDROID_EVENT**) calloc(sizeof(ANDROID_EVENT*), queue->size);
|
||||
queue->events = (ANDROID_EVENT**) calloc(queue->size, sizeof(ANDROID_EVENT*));
|
||||
|
||||
if (!queue->events)
|
||||
{
|
||||
|
@ -9,8 +9,8 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
#ifndef FREERDP_ANDROID_EVENT_H
|
||||
#define FREERDP_ANDROID_EVENT_H
|
||||
#ifndef FREERDP_CLIENT_ANDROID_EVENT_H
|
||||
#define FREERDP_CLIENT_ANDROID_EVENT_H
|
||||
#include <freerdp/freerdp.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
@ -79,4 +79,4 @@ FREERDP_LOCAL void android_event_free(ANDROID_EVENT* event);
|
||||
FREERDP_LOCAL BOOL android_event_queue_init(freerdp* inst);
|
||||
FREERDP_LOCAL void android_event_queue_uninit(freerdp* inst);
|
||||
|
||||
#endif /* FREERDP_ANDROID_EVENT_H */
|
||||
#endif /* FREERDP_CLIENT_ANDROID_EVENT_H */
|
||||
|
@ -7,8 +7,8 @@
|
||||
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
#ifndef __ANDROID_FREERDP_H
|
||||
#define __ANDROID_FREERDP_H
|
||||
#ifndef FREERDP_CLIENT_ANDROID_FREERDP_H
|
||||
#define FREERDP_CLIENT_ANDROID_FREERDP_H
|
||||
|
||||
#include <jni.h>
|
||||
|
||||
@ -40,6 +40,6 @@ struct android_context
|
||||
};
|
||||
typedef struct android_context androidContext;
|
||||
|
||||
#endif /* __ANDROID_FREERDP_H */
|
||||
#endif /* FREERDP_CLIENT_ANDROID_FREERDP_H */
|
||||
|
||||
|
||||
|
@ -17,12 +17,12 @@
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __ANDROID_FREERDP_JNI_H
|
||||
#define __ANDROID_FREERDP_JNI_H
|
||||
#ifndef FREERDP_CLIENT_ANDROID_FREERDP_JNI_H
|
||||
#define FREERDP_CLIENT_ANDROID_FREERDP_JNI_H
|
||||
|
||||
#define JAVA_LIBFREERDP_CLASS "com/freerdp/freerdpcore/services/LibFreeRDP"
|
||||
#define JAVA_CONTEXT_CLASS "android/content/Context"
|
||||
#define JAVA_FILE_CLASS "java/io/File"
|
||||
|
||||
#endif /* __ANDROID_FREERDP_JNI_H */
|
||||
#endif /* FREERDP_CLIENT_ANDROID_FREERDP_JNI_H */
|
||||
|
||||
|
@ -10,8 +10,8 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
#ifndef FREERDP_ANDROID_JNI_CALLBACK_H
|
||||
#define FREERDP_ANDROID_JNI_CALLBACK_H
|
||||
#ifndef FREERDP_CLIENT_ANDROID_JNI_CALLBACK_H
|
||||
#define FREERDP_CLIENT_ANDROID_JNI_CALLBACK_H
|
||||
|
||||
#include <jni.h>
|
||||
#include <stdarg.h>
|
||||
@ -27,5 +27,5 @@ FREERDP_LOCAL jboolean freerdp_callback_bool_result(const char* callback,
|
||||
FREERDP_LOCAL jint freerdp_callback_int_result(const char* callback,
|
||||
const char* signature, ...);
|
||||
|
||||
#endif /* FREERDP_ANDROID_JNI_CALLBACK_H */
|
||||
#endif /* FREERDP_CLIENT_ANDROID_JNI_CALLBACK_H */
|
||||
|
||||
|
@ -9,8 +9,8 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
#ifndef _ANDROID_JNI_UTILS_H_
|
||||
#define _ANDROID_JNI_UTILS_H_
|
||||
#ifndef FREERDP_CLIENT_ANDROID_JNI_UTILS_H
|
||||
#define FREERDP_CLIENT_ANDROID_JNI_UTILS_H
|
||||
|
||||
#include <jni.h>
|
||||
#include <freerdp/api.h>
|
||||
@ -34,4 +34,4 @@ FREERDP_LOCAL extern JavaVM* g_JavaVm;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _ANDROID_JNI_UTILS_H_ */
|
||||
#endif /* FREERDP_CLIENT_ANDROID_JNI_UTILS_H */
|
||||
|
@ -17,12 +17,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __DF_EVENT_H
|
||||
#define __DF_EVENT_H
|
||||
#ifndef FREERDP_CLIENT_DF_EVENT_H
|
||||
#define FREERDP_CLIENT_DF_EVENT_H
|
||||
|
||||
#include "dfreerdp.h"
|
||||
|
||||
void df_keyboard_init(void);
|
||||
BOOL df_event_process(freerdp* instance, DFBEvent* event);
|
||||
|
||||
#endif /* __DF_EVENT_H */
|
||||
#endif /* FREERDP_CLIENT_DF_EVENT_H */
|
||||
|
@ -17,11 +17,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __DF_GRAPHICS_H
|
||||
#define __DF_GRAPHICS_H
|
||||
#ifndef FREERDP_CLIENT_DF_GRAPHICS_H
|
||||
#define FREERDP_CLIENT_DF_GRAPHICS_H
|
||||
|
||||
#include "dfreerdp.h"
|
||||
|
||||
void df_register_graphics(rdpGraphics* graphics);
|
||||
|
||||
#endif /* __DF_GRAPHICS_H */
|
||||
#endif /* FREERDP_CLIENT_DF_GRAPHICS_H */
|
||||
|
@ -17,8 +17,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __DFREERDP_H
|
||||
#define __DFREERDP_H
|
||||
#ifndef FREERDP_CLIENT_DF_FREERDP_H
|
||||
#define FREERDP_CLIENT_DF_FREERDP_H
|
||||
|
||||
#include "config.h"
|
||||
#include <freerdp/freerdp.h>
|
||||
@ -67,4 +67,4 @@ struct df_info
|
||||
IDirectFBEventBuffer* event_buffer;
|
||||
};
|
||||
|
||||
#endif /* __DFREERDP_H */
|
||||
#endif /* FREERDP_CLIENT_DF_FREERDP_H */
|
||||
|
@ -1,5 +1,5 @@
|
||||
#ifndef MRDPVIEW_H
|
||||
#define MRDPVIEW_H
|
||||
#ifndef FREERDP_CLIENT_MAC_MRDPVIEW_H
|
||||
#define FREERDP_CLIENT_MAC_MRDPVIEW_H
|
||||
|
||||
/**
|
||||
* FreeRDP: A Remote Desktop Protocol Implementation
|
||||
@ -85,4 +85,4 @@ BOOL mac_post_connect(freerdp* instance);
|
||||
BOOL mac_authenticate(freerdp* instance, char** username, char** password,
|
||||
char** domain);
|
||||
|
||||
#endif // MRDPVIEW_H
|
||||
#endif /* FREERDP_CLIENT_MAC_MRDPVIEW_H */
|
||||
|
@ -19,8 +19,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __MF_CLIENT_H
|
||||
#define __MF_CLIENT_H
|
||||
#ifndef FREERDP_CLIENT_MAC_CLIENT_H
|
||||
#define FREERDP_CLIENT_MAC_CLIENT_H
|
||||
|
||||
#include <freerdp/client.h>
|
||||
|
||||
@ -40,4 +40,4 @@ FREERDP_API int RdpClientEntry(RDP_CLIENT_ENTRY_POINTS* pEntryPoints);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif /* FREERDP_CLIENT_MAC_CLIENT_H */
|
||||
|
@ -1,5 +1,5 @@
|
||||
#ifndef MFREERDP_H
|
||||
#define MFREERDP_H
|
||||
#ifndef FREERDP_CLIENT_MAC_FREERDP_H
|
||||
#define FREERDP_CLIENT_MAC_FREERDP_H
|
||||
|
||||
typedef struct mf_context mfContext;
|
||||
|
||||
@ -86,4 +86,4 @@ struct mf_context
|
||||
int yMaxScroll; // maximum vertical scroll value
|
||||
};
|
||||
|
||||
#endif // MFREERDP_H
|
||||
#endif /* FREERDP_CLIENT_MAC_FREERDP_H */
|
||||
|
@ -17,8 +17,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef WLF_CHANNELS_H
|
||||
#define WLF_CHANNELS_H
|
||||
#ifndef FREERDP_CLIENT_WAYLAND_CHANNELS_H
|
||||
#define FREERDP_CLIENT_WAYLAND_CHANNELS_H
|
||||
|
||||
#include <freerdp/freerdp.h>
|
||||
#include <freerdp/client/channels.h>
|
||||
@ -39,4 +39,4 @@ void wlf_OnChannelConnectedEventHandler(rdpContext* context,
|
||||
void wlf_OnChannelDisconnectedEventHandler(rdpContext* context,
|
||||
ChannelDisconnectedEventArgs* e);
|
||||
|
||||
#endif
|
||||
#endif /* FREERDP_CLIENT_WAYLAND_CHANNELS_H */
|
||||
|
@ -18,8 +18,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __WLF_INPUT_H
|
||||
#define __WLF_INPUT_H
|
||||
#ifndef FREERDP_CLIENT_WAYLAND_INPUT_H
|
||||
#define FREERDP_CLIENT_WAYLAND_INPUT_H
|
||||
|
||||
#include <freerdp/freerdp.h>
|
||||
#include <freerdp/gdi/gdi.h>
|
||||
@ -35,4 +35,4 @@ BOOL wlf_handle_pointer_axis(freerdp* instance, UwacPointerAxisEvent* ev);
|
||||
BOOL wlf_handle_key(freerdp* instance, UwacKeyEvent* ev);
|
||||
BOOL wlf_keyboard_enter(freerdp* instance, UwacKeyboardEnterLeaveEvent* ev);
|
||||
|
||||
#endif /* __WLF_INPUT_H */
|
||||
#endif /* FREERDP_CLIENT_WAYLAND_INPUT_H */
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include <freerdp/gdi/gdi.h>
|
||||
#include <freerdp/client.h>
|
||||
#include <freerdp/utils/signal.h>
|
||||
#include <freerdp/locale/keyboard.h>
|
||||
|
||||
#include <linux/input.h>
|
||||
|
||||
|
@ -17,8 +17,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __WLFREERDP_H
|
||||
#define __WLFREERDP_H
|
||||
#ifndef FREERDP_CLIENT_WAYLAND_FREERDP_H
|
||||
#define FREERDP_CLIENT_WAYLAND_FREERDP_H
|
||||
|
||||
#include <freerdp/client/encomsp.h>
|
||||
#include <freerdp/client/rdpei.h>
|
||||
@ -50,5 +50,5 @@ struct wlf_context
|
||||
EncomspClientContext* encomsp;
|
||||
};
|
||||
|
||||
#endif /* __WLFREERDP_H */
|
||||
#endif /* FREERDP_CLIENT_WAYLAND_FREERDP_H */
|
||||
|
||||
|
@ -19,9 +19,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __WFREERDP_H
|
||||
#define __WFREERDP_H
|
||||
#ifndef FREERDP_CLIENT_WIN_FREERDP_H
|
||||
#define FREERDP_CLIENT_WIN_FREERDP_H
|
||||
|
||||
#include "wf_interface.h"
|
||||
|
||||
#endif
|
||||
#endif /* FREERDP_CLIENT_WIN_FREERDP_H */
|
||||
|
@ -16,8 +16,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __WF_CHANNELS_H
|
||||
#define __WF_CHANNELS_H
|
||||
#ifndef FREERDP_CLIENT_WIN_CHANNELS_H
|
||||
#define FREERDP_CLIENT_WIN_CHANNELS_H
|
||||
|
||||
#include <freerdp/freerdp.h>
|
||||
#include <freerdp/client/channels.h>
|
||||
@ -33,4 +33,4 @@ void wf_OnChannelConnectedEventHandler(rdpContext* context,
|
||||
void wf_OnChannelDisconnectedEventHandler(rdpContext* context,
|
||||
ChannelDisconnectedEventArgs* e);
|
||||
|
||||
#endif
|
||||
#endif /* FREERDP_CLIENT_WIN_CHANNELS_H */
|
||||
|
@ -19,8 +19,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __WF_INTERFACE_H
|
||||
#define __WF_INTERFACE_H
|
||||
#ifndef FREERDP_CLIENT_WIN_INTERFACE_H
|
||||
#define FREERDP_CLIENT_WIN_INTERFACE_H
|
||||
|
||||
#include <winpr/windows.h>
|
||||
|
||||
@ -148,4 +148,4 @@ FREERDP_API void wf_size_scrollbars(wfContext* wfc, UINT32 client_width,
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif /* FREERDP_CLIENT_WIN_INTERFACE_H */
|
||||
|
@ -2508,8 +2508,8 @@ BOOL wf_cliprdr_init(wfContext* wfc, CliprdrClientContext* cliprdr)
|
||||
&& clipboard->GetUpdatedClipboardFormats))
|
||||
clipboard->legacyApi = TRUE;
|
||||
|
||||
if (!(clipboard->format_mappings = (formatMapping*) calloc(1,
|
||||
sizeof(formatMapping) * clipboard->map_capacity)))
|
||||
if (!(clipboard->format_mappings = (formatMapping*) calloc(clipboard->map_capacity,
|
||||
sizeof(formatMapping))))
|
||||
goto error;
|
||||
|
||||
if (!(clipboard->response_data_event = CreateEvent(NULL, TRUE, FALSE,
|
||||
|
@ -16,12 +16,12 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#ifndef __WF_CLIPRDR_H
|
||||
#define __WF_CLIPRDR_H
|
||||
#ifndef FREERDP_CLIENT_WIN_CLIPRDR_H
|
||||
#define FREERDP_CLIENT_WIN_CLIPRDR_H
|
||||
|
||||
#include "wf_client.h"
|
||||
|
||||
BOOL wf_cliprdr_init(wfContext* wfc, CliprdrClientContext* cliprdr);
|
||||
BOOL wf_cliprdr_uninit(wfContext* wfc, CliprdrClientContext* cliprdr);
|
||||
|
||||
#endif /* __WF_CLIPRDR_H */
|
||||
#endif /* FREERDP_CLIENT_WIN_CLIPRDR_H */
|
||||
|
@ -19,8 +19,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __WF_EVENT_H
|
||||
#define __WF_EVENT_H
|
||||
#ifndef FREERDP_CLIENT_WIN_EVENT_H
|
||||
#define FREERDP_CLIENT_WIN_EVENT_H
|
||||
|
||||
#include "wf_client.h"
|
||||
#include <freerdp/log.h>
|
||||
@ -38,4 +38,4 @@ void wf_event_focus_in(wfContext* wfc);
|
||||
#define DEBUG_KBD(...) do { } while (0)
|
||||
#endif
|
||||
|
||||
#endif /* __WF_EVENT_H */
|
||||
#endif /* FREERDP_CLIENT_WIN_EVENT_H */
|
||||
|
@ -17,8 +17,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __WF_FLOATBAR_H__
|
||||
#define __WF_FLOATBAR_H__
|
||||
#ifndef FREERDP_CLIENT_WIN_FLOATBAR_H
|
||||
#define FREERDP_CLIENT_WIN_FLOATBAR_H
|
||||
|
||||
typedef struct _FloatBar FloatBar;
|
||||
typedef struct wf_context wfContext;
|
||||
@ -27,4 +27,4 @@ void floatbar_window_create(wfContext* wfc);
|
||||
int floatbar_show(FloatBar* floatbar);
|
||||
int floatbar_hide(FloatBar* floatbar);
|
||||
|
||||
#endif
|
||||
#endif /* FREERDP_CLIENT_WIN_FLOATBAR_H */
|
||||
|
@ -19,8 +19,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __WF_GDI_H
|
||||
#define __WF_GDI_H
|
||||
#ifndef FREERDP_CLIENT_WIN_GDI_H
|
||||
#define FREERDP_CLIENT_WIN_GDI_H
|
||||
|
||||
#include "wf_client.h"
|
||||
|
||||
@ -37,4 +37,4 @@ void wf_gdi_register_update_callbacks(rdpUpdate* update);
|
||||
|
||||
void wf_update_canvas_diff(wfContext* wfc);
|
||||
|
||||
#endif /* __WF_GDI_H */
|
||||
#endif /* FREERDP_CLIENT_WIN_GDI_H */
|
||||
|
@ -17,8 +17,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __WF_GRAPHICS_H
|
||||
#define __WF_GRAPHICS_H
|
||||
#ifndef FREERDP_CLIENT_WIN_GRAPHICS_H
|
||||
#define FREERDP_CLIENT_WIN_GRAPHICS_H
|
||||
|
||||
#include "wf_client.h"
|
||||
|
||||
@ -31,4 +31,4 @@ void wf_image_free(wfBitmap* image);
|
||||
BOOL wf_register_pointer(rdpGraphics* graphics);
|
||||
BOOL wf_register_graphics(rdpGraphics* graphics);
|
||||
|
||||
#endif /* WF_GRAPHICS */
|
||||
#endif /* FREERDP_CLIENT_WIN_GRAPHICS_H */
|
||||
|
@ -16,8 +16,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __WF_RAIL_H
|
||||
#define __WF_RAIL_H
|
||||
#ifndef FREERDP_CLIENT_WIN_RAIL_H
|
||||
#define FREERDP_CLIENT_WIN_RAIL_H
|
||||
|
||||
typedef struct wf_rail_window wfRailWindow;
|
||||
|
||||
@ -46,4 +46,4 @@ void wf_rail_uninit(wfContext* wfc, RailClientContext* rail);
|
||||
|
||||
void wf_rail_invalidate_region(wfContext* wfc, REGION16* invalidRegion);
|
||||
|
||||
#endif
|
||||
#endif /* FREERDP_CLIENT_WIN_RAIL_H */
|
||||
|
@ -17,8 +17,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __XF_CHANNELS_H
|
||||
#define __XF_CHANNELS_H
|
||||
#ifndef FREERDP_CLIENT_X11_CHANNELS_H
|
||||
#define FREERDP_CLIENT_X11_CHANNELS_H
|
||||
|
||||
#include <freerdp/freerdp.h>
|
||||
#include <freerdp/client/channels.h>
|
||||
@ -35,4 +35,4 @@ int xf_on_channel_disconnected(freerdp* instance, const char* name, void* pInter
|
||||
void xf_OnChannelConnectedEventHandler(rdpContext* context, ChannelConnectedEventArgs* e);
|
||||
void xf_OnChannelDisconnectedEventHandler(rdpContext* context, ChannelDisconnectedEventArgs* e);
|
||||
|
||||
#endif
|
||||
#endif /* FREERDP_CLIENT_X11_CHANNELS_H */
|
||||
|
@ -17,8 +17,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __XF_CLIENT_H
|
||||
#define __XF_CLIENT_H
|
||||
#ifndef FREERDP_CLIENT_X11_CLIENT_H
|
||||
#define FREERDP_CLIENT_X11_CLIENT_H
|
||||
|
||||
#include <winpr/crt.h>
|
||||
#include <winpr/synch.h>
|
||||
@ -50,4 +50,4 @@ FREERDP_API int RdpClientEntry(RDP_CLIENT_ENTRY_POINTS* pEntryPoints);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __XF_CLIENT_H */
|
||||
#endif /* FREERDP_CLIENT_X11_CLIENT_H */
|
||||
|
@ -1603,8 +1603,7 @@ static UINT xf_cliprdr_clipboard_file_range_failure(wClipboardDelegate* delegate
|
||||
|
||||
xfClipboard* xf_clipboard_new(xfContext* xfc)
|
||||
{
|
||||
int i;
|
||||
int n;
|
||||
int i, n = 0;
|
||||
rdpChannels* channels;
|
||||
xfClipboard* clipboard;
|
||||
|
||||
@ -1664,8 +1663,6 @@ xfClipboard* xf_clipboard_new(xfContext* xfc)
|
||||
"Warning: Using clipboard redirection without XFIXES extension is strongly discouraged!");
|
||||
#endif
|
||||
|
||||
n = 0;
|
||||
|
||||
clipboard->clientFormats[n].atom = XInternAtom(xfc->display, "_FREERDP_RAW", False);
|
||||
clipboard->clientFormats[n].formatId = CF_RAW;
|
||||
n++;
|
||||
|
@ -17,8 +17,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __XF_CLIPRDR_H
|
||||
#define __XF_CLIPRDR_H
|
||||
#ifndef FREERDP_CLIENT_X11_CLIPRDR_H
|
||||
#define FREERDP_CLIENT_X11_CLIPRDR_H
|
||||
|
||||
#include "xf_client.h"
|
||||
#include "xfreerdp.h"
|
||||
@ -33,4 +33,4 @@ void xf_cliprdr_uninit(xfContext* xfc, CliprdrClientContext* cliprdr);
|
||||
|
||||
void xf_cliprdr_handle_xevent(xfContext* xfc, XEvent* event);
|
||||
|
||||
#endif /* __XF_CLIPRDR_H */
|
||||
#endif /* FREERDP_CLIENT_X11_CLIPRDR_H */
|
||||
|
@ -17,8 +17,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __XF_EVENT_H
|
||||
#define __XF_EVENT_H
|
||||
#ifndef FREERDP_CLIENT_X11_EVENT_H
|
||||
#define FREERDP_CLIENT_X11_EVENT_H
|
||||
|
||||
#include "xf_keyboard.h"
|
||||
|
||||
@ -37,4 +37,4 @@ BOOL xf_generic_MotionNotify(xfContext* xfc, int x, int y, int state, Window win
|
||||
BOOL xf_generic_ButtonPress(xfContext* xfc, int x, int y, int button, Window window, BOOL app);
|
||||
BOOL xf_generic_ButtonRelease(xfContext* xfc, int x, int y, int button, Window window, BOOL app);
|
||||
|
||||
#endif /* __XF_EVENT_H */
|
||||
#endif /* FREERDP_CLIENT_X11_EVENT_H */
|
||||
|
@ -580,7 +580,7 @@ static BOOL xf_gdi_polyline(rdpContext* context,
|
||||
XSetFillStyle(xfc->display, xfc->gc, FillSolid);
|
||||
XSetForeground(xfc->display, xfc->gc, color.pixel);
|
||||
npoints = polyline->numDeltaEntries + 1;
|
||||
points = malloc(sizeof(XPoint) * npoints);
|
||||
points = calloc(npoints, sizeof(XPoint));
|
||||
|
||||
if (!points)
|
||||
{
|
||||
@ -743,7 +743,7 @@ static BOOL xf_gdi_polygon_sc(rdpContext* context,
|
||||
xf_lock_x11(xfc, FALSE);
|
||||
xf_set_rop2(xfc, polygon_sc->bRop2);
|
||||
npoints = polygon_sc->numPoints + 1;
|
||||
points = malloc(sizeof(XPoint) * npoints);
|
||||
points = calloc(npoints, sizeof(XPoint));
|
||||
|
||||
if (!points)
|
||||
{
|
||||
@ -814,7 +814,7 @@ static BOOL xf_gdi_polygon_cb(rdpContext* context,
|
||||
brush = &(polygon_cb->brush);
|
||||
xf_set_rop2(xfc, polygon_cb->bRop2);
|
||||
npoints = polygon_cb->numPoints + 1;
|
||||
points = malloc(sizeof(XPoint) * npoints);
|
||||
points = calloc(npoints, sizeof(XPoint));
|
||||
|
||||
if (!points)
|
||||
{
|
||||
|
@ -19,8 +19,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __XF_GDI_H
|
||||
#define __XF_GDI_H
|
||||
#ifndef FREERDP_CLIENT_X11_GDI_H
|
||||
#define FREERDP_CLIENT_X11_GDI_H
|
||||
|
||||
#include <freerdp/gdi/gdi.h>
|
||||
|
||||
@ -29,4 +29,4 @@
|
||||
|
||||
void xf_gdi_register_update_callbacks(rdpUpdate* update);
|
||||
|
||||
#endif /* __XF_GDI_H */
|
||||
#endif /* FREERDP_CLIENT_X11_GDI_H */
|
||||
|
@ -19,8 +19,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __XF_GRAPHICS_PIPELINE_H
|
||||
#define __XF_GRAPHICS_PIPELINE_H
|
||||
#ifndef FREERDP_CLIENT_X11_GFX_H
|
||||
#define FREERDP_CLIENT_X11_GFX_H
|
||||
|
||||
#include "xf_client.h"
|
||||
#include "xfreerdp.h"
|
||||
@ -53,4 +53,4 @@ UINT xf_OutputExpose(xfContext* xfc, UINT32 x, UINT32 y,
|
||||
void xf_graphics_pipeline_init(xfContext* xfc, RdpgfxClientContext* gfx);
|
||||
void xf_graphics_pipeline_uninit(xfContext* xfc, RdpgfxClientContext* gfx);
|
||||
|
||||
#endif /* __XF_GRAPHICS_PIPELINE_H */
|
||||
#endif /* FREERDP_CLIENT_X11_GFX_H */
|
||||
|
@ -17,8 +17,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __XF_GRAPHICS_H
|
||||
#define __XF_GRAPHICS_H
|
||||
#ifndef FREERDP_CLIENT_X11_GRAPHICS_H
|
||||
#define FREERDP_CLIENT_X11_GRAPHICS_H
|
||||
|
||||
#include "xf_client.h"
|
||||
#include "xfreerdp.h"
|
||||
@ -29,4 +29,4 @@ BOOL xf_register_graphics(rdpGraphics* graphics);
|
||||
BOOL xf_decode_color(xfContext* xfc, const UINT32 srcColor, XColor* color);
|
||||
UINT32 xf_get_local_color_format(xfContext* xfc, BOOL aligned);
|
||||
|
||||
#endif /* __XF_GRAPHICS_H */
|
||||
#endif /* FREERDP_CLIENT_X11_GRAPHICS_H */
|
||||
|
@ -17,8 +17,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __XF_INPUT_H
|
||||
#define __XF_INPUT_H
|
||||
#ifndef FREERDP_CLIENT_X11_INPUT_H
|
||||
#define FREERDP_CLIENT_X11_INPUT_H
|
||||
|
||||
#include "xf_client.h"
|
||||
#include "xfreerdp.h"
|
||||
@ -30,4 +30,4 @@
|
||||
int xf_input_init(xfContext* xfc, Window window);
|
||||
int xf_input_handle_event(xfContext* xfc, XEvent* event);
|
||||
|
||||
#endif
|
||||
#endif /* FREERDP_CLIENT_X11_INPUT_H */
|
||||
|
@ -17,8 +17,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef XF_KEYBOARD_H
|
||||
#define XF_KEYBOARD_H
|
||||
#ifndef FREERDP_CLIENT_X11_XF_KEYBOARD_H
|
||||
#define FREERDP_CLIENT_X11_XF_KEYBOARD_H
|
||||
|
||||
#include <freerdp/locale/keyboard.h>
|
||||
|
||||
@ -59,4 +59,4 @@ void xf_keyboard_handle_special_keys_release(xfContext* xfc, KeySym keysym);
|
||||
BOOL xf_keyboard_set_indicators(rdpContext* context, UINT16 led_flags);
|
||||
BOOL xf_keyboard_set_ime_status(rdpContext* context, UINT16 imeId, UINT32 imeState, UINT32 imeConvMode);
|
||||
|
||||
#endif /* __XF_KEYBOARD_H */
|
||||
#endif /* FREERDP_CLIENT_X11_XF_KEYBOARD_H */
|
||||
|
@ -17,8 +17,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __XF_MONITOR_H
|
||||
#define __XF_MONITOR_H
|
||||
#ifndef FREERDP_CLIENT_X11_MONITOR_H
|
||||
#define FREERDP_CLIENT_X11_MONITOR_H
|
||||
|
||||
#include <freerdp/api.h>
|
||||
#include <freerdp/freerdp.h>
|
||||
@ -47,4 +47,4 @@ FREERDP_API int xf_list_monitors(xfContext* xfc);
|
||||
FREERDP_API BOOL xf_detect_monitors(xfContext* xfc, UINT32* pWidth, UINT32* pHeight);
|
||||
FREERDP_API void xf_monitors_free(xfContext* xfc);
|
||||
|
||||
#endif /* __XF_MONITOR_H */
|
||||
#endif /* FREERDP_CLIENT_X11_MONITOR_H */
|
||||
|
@ -17,8 +17,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __XF_RAIL_H
|
||||
#define __XF_RAIL_H
|
||||
#ifndef FREERDP_CLIENT_X11_RAIL_H
|
||||
#define FREERDP_CLIENT_X11_RAIL_H
|
||||
|
||||
#include "xf_client.h"
|
||||
#include "xfreerdp.h"
|
||||
@ -36,4 +36,4 @@ void xf_rail_disable_remoteapp_mode(xfContext* xfc);
|
||||
int xf_rail_init(xfContext* xfc, RailClientContext* rail);
|
||||
int xf_rail_uninit(xfContext* xfc, RailClientContext* rail);
|
||||
|
||||
#endif /* __XF_RAIL_H */
|
||||
#endif /* FREERDP_CLIENT_X11_RAIL_H */
|
||||
|
@ -17,8 +17,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __XF_TSMF_H
|
||||
#define __XF_TSMF_H
|
||||
#ifndef FREERDP_CLIENT_X11_TSMF_H
|
||||
#define FREERDP_CLIENT_X11_TSMF_H
|
||||
|
||||
#include "xf_client.h"
|
||||
#include "xfreerdp.h"
|
||||
@ -26,4 +26,4 @@
|
||||
int xf_tsmf_init(xfContext* xfc, TsmfClientContext* tsmf);
|
||||
int xf_tsmf_uninit(xfContext* xfc, TsmfClientContext* tsmf);
|
||||
|
||||
#endif /* __XF_TSMF_H */
|
||||
#endif /* FREERDP_CLIENT_X11_TSMF_H */
|
||||
|
@ -17,8 +17,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __XF_WINDOW_H
|
||||
#define __XF_WINDOW_H
|
||||
#ifndef FREERDP_CLIENT_X11_WINDOW_H
|
||||
#define FREERDP_CLIENT_X11_WINDOW_H
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
@ -174,4 +174,4 @@ void xf_StartLocalMoveSize(xfContext* xfc, xfAppWindow* appWindow, int direction
|
||||
void xf_EndLocalMoveSize(xfContext* xfc, xfAppWindow* appWindow);
|
||||
xfAppWindow* xf_AppWindowFromX11Window(xfContext* xfc, Window wnd);
|
||||
|
||||
#endif /* __XF_WINDOW_H */
|
||||
#endif /* FREERDP_CLIENT_X11_WINDOW_H */
|
||||
|
@ -19,8 +19,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __XFREERDP_H
|
||||
#define __XFREERDP_H
|
||||
#ifndef FREERDP_CLIENT_X11_FREERDP_H
|
||||
#define FREERDP_CLIENT_X11_FREERDP_H
|
||||
|
||||
typedef struct xf_context xfContext;
|
||||
|
||||
@ -287,5 +287,5 @@ void xf_draw_screen(xfContext* xfc, int x, int y, int w, int h);
|
||||
|
||||
FREERDP_API DWORD xf_exit_code_from_disconnect_reason(DWORD reason);
|
||||
|
||||
#endif /* __XFREERDP_H */
|
||||
#endif /* FREERDP_CLIENT_X11_FREERDP_H */
|
||||
|
||||
|
@ -17,8 +17,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef FREERDP_CLIENT_COMPATIBILITY_H
|
||||
#define FREERDP_CLIENT_COMPATIBILITY_H
|
||||
#ifndef FREERDP_CLIENT_COMMON_COMPATIBILITY_H
|
||||
#define FREERDP_CLIENT_COMMON_COMPATIBILITY_H
|
||||
|
||||
#include <freerdp/api.h>
|
||||
#include <freerdp/freerdp.h>
|
||||
@ -26,5 +26,5 @@
|
||||
FREERDP_API int freerdp_detect_old_command_line_syntax(int argc, char** argv, int* count);
|
||||
FREERDP_API int freerdp_client_parse_old_command_line_arguments(int argc, char** argv, rdpSettings* settings);
|
||||
|
||||
#endif /* FREERDP_CLIENT_COMPATIBILITY */
|
||||
#endif /* FREERDP_CLIENT_COMMON_COMPATIBILITY_H */
|
||||
|
||||
|
@ -814,7 +814,7 @@ BOOL freerdp_client_write_rdp_file(const rdpFile* file, const char* name, BOOL u
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
buffer = (char*) malloc((length + 1) * sizeof(char));
|
||||
buffer = (char*) calloc((length + 1), sizeof(char));
|
||||
|
||||
if (freerdp_client_write_rdp_file_buffer(file, buffer, length + 1) != length)
|
||||
{
|
||||
@ -1427,7 +1427,7 @@ rdpFile* freerdp_client_rdp_file_new()
|
||||
FillMemory(file, sizeof(rdpFile), 0xFF);
|
||||
file->lineCount = 0;
|
||||
file->lineSize = 32;
|
||||
file->lines = (rdpFileLine*) malloc(file->lineSize * sizeof(rdpFileLine));
|
||||
file->lines = (rdpFileLine*) calloc(file->lineSize, sizeof(rdpFileLine));
|
||||
|
||||
if (!file->lines)
|
||||
{
|
||||
@ -1437,7 +1437,7 @@ rdpFile* freerdp_client_rdp_file_new()
|
||||
|
||||
file->argc = 0;
|
||||
file->argSize = 32;
|
||||
file->argv = (char**) malloc(file->argSize * sizeof(char*));
|
||||
file->argv = (char**) calloc(file->argSize, sizeof(char*));
|
||||
|
||||
if (!file->argv)
|
||||
{
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user