sonar-openedge icon indicating copy to clipboard operation
sonar-openedge copied to clipboard

Conversion from LONGCHAR to CHARACTER can overflow if source expression is larger than 32kb

Open stefandrissen opened this issue 1 year ago • 0 comments

Could this be handled automatically?

DEFINE VARIABLE cresponse  AS CHARACTER   NO-UNDO.
DEFINE VARIABLE oMemptr    AS OpenEdge.Core.Memptr NO-UNDO.

oMemptr = New OpenEdge.Core.Memptr().
cresponse = oMemptr:GetString( 1, 30000 ).

The second parameter op the GetString method ensures that the result is < 32000.

stefandrissen avatar Oct 17 '23 06:10 stefandrissen