diff --git a/client/iOS/FreeRDP/ios_freerdp.m b/client/iOS/FreeRDP/ios_freerdp.m index ae3f1e084..ee0cdddc0 100644 --- a/client/iOS/FreeRDP/ios_freerdp.m +++ b/client/iOS/FreeRDP/ios_freerdp.m @@ -221,7 +221,9 @@ ios_run_freerdp(freerdp * instance) [pool release]; pool = nil; } - + + CGContextRelease(mfi->bitmap_context); + mfi->bitmap_context = NULL; mfi->connection_state = TSXConnectionDisconnected; // Cleanup diff --git a/client/iOS/Models/RDPSession.m b/client/iOS/Models/RDPSession.m index af400bb61..6144637d1 100644 --- a/client/iOS/Models/RDPSession.m +++ b/client/iOS/Models/RDPSession.m @@ -190,7 +190,7 @@ NSString* TSXSessionDidFailToConnectNotification = @"TSXSessionDidFailToConnect" - (CGContextRef)bitmapContext { - return [self mfi]->bitmap_context; + return [self mfi]->bitmap_context; } #pragma mark - diff --git a/libfreerdp/crypto/der.c b/libfreerdp/crypto/der.c index 7c4694f17..1cc5eb770 100644 --- a/libfreerdp/crypto/der.c +++ b/libfreerdp/crypto/der.c @@ -27,9 +27,9 @@ int _der_skip_length(int length) { - if (length > 0x81 && length <= 0x102) + if (length > 0x7F && length <= 0xFF) return 2; - else if (length > 0x102) + else if (length > 0xFF) return 3; else return 1;