diff --git a/include/freerdp/codec/nsc.h b/include/freerdp/codec/nsc.h index b100ae305..d7b9854ef 100644 --- a/include/freerdp/codec/nsc.h +++ b/include/freerdp/codec/nsc.h @@ -84,10 +84,17 @@ extern "C" wStream* WINPR_RESTRICT s, const BYTE* WINPR_RESTRICT bmpdata, UINT32 width, UINT32 height, UINT32 rowstride); - FREERDP_API BOOL nsc_decompose_message(NSC_CONTEXT* WINPR_RESTRICT context, - wStream* WINPR_RESTRICT s, BYTE* WINPR_RESTRICT bmpdata, - UINT32 x, UINT32 y, UINT32 width, UINT32 height, - UINT32 rowstride, UINT32 format, UINT32 flip); + +#if !defined(WITHOUT_FREERDP_3x_DEPRECATED) + + WINPR_DEPRECATED_VAR( + "[since 3.23.0] deprecated, insecure! missing length checks. use nsc_process_message", + FREERDP_API BOOL nsc_decompose_message(NSC_CONTEXT* WINPR_RESTRICT context, + wStream* WINPR_RESTRICT s, + BYTE* WINPR_RESTRICT bmpdata, UINT32 x, UINT32 y, + UINT32 width, UINT32 height, UINT32 rowstride, + UINT32 format, UINT32 flip)); +#endif FREERDP_API BOOL nsc_context_reset(NSC_CONTEXT* WINPR_RESTRICT context, UINT32 width, UINT32 height); diff --git a/libfreerdp/codec/nsc_encode.c b/libfreerdp/codec/nsc_encode.c index b0fa8f4f2..ec6f282e1 100644 --- a/libfreerdp/codec/nsc_encode.c +++ b/libfreerdp/codec/nsc_encode.c @@ -495,6 +495,7 @@ BOOL nsc_compose_message(NSC_CONTEXT* WINPR_RESTRICT context, wStream* WINPR_RES return nsc_write_message(context, s, &message); } +#if !defined(WITHOUT_FREERDP_3x_DEPRECATED) BOOL nsc_decompose_message(NSC_CONTEXT* WINPR_RESTRICT context, wStream* WINPR_RESTRICT s, BYTE* WINPR_RESTRICT bmpdata, UINT32 x, UINT32 y, UINT32 width, UINT32 height, UINT32 rowstride, UINT32 format, UINT32 flip) @@ -511,3 +512,4 @@ BOOL nsc_decompose_message(NSC_CONTEXT* WINPR_RESTRICT context, wStream* WINPR_R Stream_Seek(s, size); return TRUE; } +#endif