diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2007-03-18 17:09:55 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2007-03-18 17:09:55 +0000 |
commit | 703b5fea73f9bbdb4f41aebcd75f71d32d340a2d (patch) | |
tree | d04f837e5b02a3b90ab8a301974e250730ef6007 /css | |
parent | 0d750eac736e133eafb98cc31e1cdcabc64608c3 (diff) | |
download | netsurf-703b5fea73f9bbdb4f41aebcd75f71d32d340a2d.tar.gz netsurf-703b5fea73f9bbdb4f41aebcd75f71d32d340a2d.tar.bz2 |
Ensure content owners check that they are still interested in a content
when receiving notification that the content's in error. This prevents
content pointers being corrupted when redirects occur. Fixes 1522002,
1551475.
svn path=/trunk/netsurf/; revision=3211
Diffstat (limited to 'css')
-rw-r--r-- | css/css.c | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -919,9 +919,16 @@ void css_atimport_callback(content_msg msg, struct content *css, #endif /* todo: handle AUTH and SSL */ case CONTENT_MSG_ERROR: - c->data.css.import_content[i] = 0; - c->active--; - content_add_error(c, "?", 0); + /* The stylesheet we were fetching may have been + * redirected, in that case, the object pointers + * will differ, so ensure that the object that's + * in error is still in use by us before invalidating + * the pointer */ + if (c->data.css.import_content[i] == css) { + c->data.css.import_content[i] = 0; + c->active--; + content_add_error(c, "?", 0); + } break; case CONTENT_MSG_STATUS: |