aboutsummaryrefslogtreecommitdiffstats
path: root/main/webkit/cve-2010-3120.patch
blob: 976affc370aa04842f333b8abc1d30968bbc7857 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
description: fix cve-2010-3120
author: Michael Gilbert <michael.s.gilbert@gmail.com>
origin: http://trac.webkit.org/changeset/65329
Index: webkit-1.2.4/WebCore/page/Geolocation.cpp
===================================================================
--- webkit-1.2.4.orig/WebCore/page/Geolocation.cpp	2010-09-03 15:18:06.000000000 -0400
+++ webkit-1.2.4/WebCore/page/Geolocation.cpp	2010-09-06 22:14:03.000000000 -0400
@@ -252,6 +252,9 @@
 
 void Geolocation::getCurrentPosition(PassRefPtr<PositionCallback> successCallback, PassRefPtr<PositionErrorCallback> errorCallback, PassRefPtr<PositionOptions> options)
 {
+    if (!m_frame)
+        return;
+
     RefPtr<GeoNotifier> notifier = startRequest(successCallback, errorCallback, options);
     ASSERT(notifier);
 
@@ -260,6 +263,9 @@
 
 int Geolocation::watchPosition(PassRefPtr<PositionCallback> successCallback, PassRefPtr<PositionErrorCallback> errorCallback, PassRefPtr<PositionOptions> options)
 {
+    if (!m_frame)
+        return 0;
+
     RefPtr<GeoNotifier> notifier = startRequest(successCallback, errorCallback, options);
     ASSERT(notifier);