26 May
2023
26 May
'23
6:59 p.m.
Esme Povirk (@madewokherd) commented about dlls/gdiplus/graphics.c:
if(fit == 0) break;
- for(lret = 0; lret < fit; lret++) + for(lret = 0; lret < fit; lret++) { if(*(stringdup + sum + lret) == '\n') - break; + { + unixstyle_newline = TRUE; + break; + } + + if(*(stringdup + sum + lret) == '\r' && *(stringdup + sum + lret + 1)
You'll want to check the length passed in, something like `lret + 1 < fit` maybe. We can't assume the string is null-terminated. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/2865#note_33972