Fixed linker warning about insecure crypto and fixed compiler warning about unsigned being compared to less than zero

This commit is contained in:
Bryan Everly 2015-04-28 10:50:29 -04:00
parent bfccc06ab2
commit 6ed90e831e
2 changed files with 12 additions and 0 deletions

View File

@ -108,7 +108,11 @@ int xf_tsmf_xv_video_frame_event(TsmfClientContext* tsmf, TSMF_VIDEO_FRAME_EVENT
return -1001; return -1001;
/* In case the player is minimized */ /* In case the player is minimized */
#ifdef __OpenBSD__
if (event->x < -2048 || event->y < -2048)
#else
if (event->x < -2048 || event->y < -2048 || event->numVisibleRects < 0) if (event->x < -2048 || event->y < -2048 || event->numVisibleRects < 0)
#endif
{ {
return -1002; return -1002;
} }

View File

@ -166,7 +166,11 @@ BOOL autodetect_send_bandwidth_measure_payload(rdpContext* context, UINT16 paylo
/* Random data (better measurement in case the line is compressed) */ /* Random data (better measurement in case the line is compressed) */
for (i = 0; i < payloadLength / 4; i++) for (i = 0; i < payloadLength / 4; i++)
{ {
#ifdef __OpenBSD__
Stream_Write_UINT32(s, arc4random());
#else
Stream_Write_UINT32(s, rand()); Stream_Write_UINT32(s, rand());
#endif
} }
return rdp_send_message_channel_pdu(context->rdp, s, SEC_AUTODETECT_REQ); return rdp_send_message_channel_pdu(context->rdp, s, SEC_AUTODETECT_REQ);
@ -204,7 +208,11 @@ static BOOL autodetect_send_bandwidth_measure_stop(rdpContext* context, UINT16 p
/* Random data (better measurement in case the line is compressed) */ /* Random data (better measurement in case the line is compressed) */
for (i = 0; i < payloadLength / 4; i++) for (i = 0; i < payloadLength / 4; i++)
{ {
#ifdef __OpenBSD__
Stream_Write_UINT32(s, arc4random());
#else
Stream_Write_UINT32(s, rand()); Stream_Write_UINT32(s, rand());
#endif
} }
} }
} }