winex11.drv: Fix file drops on KDE4 and XFCE.

This commit is contained in:
Damjan Jovanovic 2009-06-14 12:25:48 +02:00 committed by Alexandre Julliard
parent 1591e3a762
commit 36685b0761
1 changed files with 2 additions and 4 deletions

View File

@ -375,9 +375,7 @@ static int X11DRV_XDND_DeconstructTextURIList(int property, void* data, int len)
{
while (end < len && uriList[end] != '\r')
++end;
if (end == len)
break;
if (uriList[end+1] != '\n')
if (end < (len - 1) && uriList[end+1] != '\n')
{
WARN("URI list line doesn't end in \\r\\n\n");
break;
@ -412,7 +410,7 @@ static int X11DRV_XDND_DeconstructTextURIList(int property, void* data, int len)
start = end + 2;
end = start;
}
if (out && end == len)
if (out && end >= len)
{
DROPFILES *dropFiles;
dropFiles = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(DROPFILES) + size + 1);