On Tue Nov 5 06:18:28 2024 +0000, Zhiyi Zhang wrote:
For Unicode notification conversions, you might want to take a look at 76f8ea75 and d7dcfe03.
<div><a target="_blank" href="https://gitlab.winehq.org/wine/wine/-/blob/6db2812411d45ca4b4d15dea9a00577ea17b508e/dlls/comctl32/pager.c#L1099-1110"><code>pager.c</code>:<pre><code lang="c">static BOOL PAGER_AdjustBuffer(PAGER_INFO *infoPtr, INT size) { if (!infoPtr->pwszBuffer) infoPtr->pwszBuffer = Alloc(size); else if (infoPtr->nBufferSize < size) infoPtr->pwszBuffer = ReAlloc(infoPtr->pwszBuffer, size); if (!infoPtr->pwszBuffer) return FALSE; if (infoPtr->nBufferSize < size) infoPtr->nBufferSize = size; return TRUE; }</code></pre></a>Why is this function designed to leak old <code>infoPtr->pwszBuffer</code> when <code>ReAlloc(infoPtr->pwszBuffer, size)</code> returns <code>NULL</code>?</div>