зеркало из https://github.com/mozilla/pjs.git
b=495392 protect against bogus GdkAtoms from gtk_selection_data_get_targets() r=karlt
This commit is contained in:
Родитель
e0d499f6cb
Коммит
062cfaa7c7
|
@ -452,6 +452,9 @@ nsClipboard::HasDataMatchingFlavors(const char** aFlavorList, PRUint32 aLength,
|
|||
|
||||
for (PRInt32 j = 0; j < n_targets; j++) {
|
||||
gchar *atom_name = gdk_atom_name(targets[j]);
|
||||
if (!atom_name)
|
||||
continue;
|
||||
|
||||
if (!strcmp(atom_name, aFlavorList[i]))
|
||||
*_retval = PR_TRUE;
|
||||
|
||||
|
|
|
@ -981,7 +981,7 @@ nsDragService::IsTargetContextList(void)
|
|||
GdkAtom atom = GDK_POINTER_TO_ATOM(tmp->data);
|
||||
gchar *name = NULL;
|
||||
name = gdk_atom_name(atom);
|
||||
if (strcmp(name, gMimeListType) == 0)
|
||||
if (name && strcmp(name, gMimeListType) == 0)
|
||||
retval = PR_TRUE;
|
||||
g_free(name);
|
||||
if (retval)
|
||||
|
|
Загрузка…
Ссылка в новой задаче