Esme Povirk (@madewokherd) commented about dlls/gdiplus/graphics.c:
if(fit == 0) break;
for(lret = 0; lret < fit; lret++)if(*(stringdup + sum + lret) == '\n')
for(lret = 0; lret < fit; lret++) {/* Unix style new line */if(*(stringdup + sum + lret) == '\n'){unix_newline = TRUE; break;}/* Windows style new line */if(*(stringdup + sum + lret) == '\r' && *(stringdup + sum + lret + 1) == '\n'){
This needs to do bounds checking in case the string ends with \r.