Fixing memory read after free in CanvasRenderingContext2D::accessFont
authorAllan Sandfeld Jensen <allan.jensen@digia.com>
Wed, 23 Jan 2013 10:52:54 +0000 (11:52 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 23 Jan 2013 11:45:19 +0000 (12:45 +0100)
commit3a94b1a765225089e710e11626ecee20de516ec6
treed7a86d6634b9f274a556d9504c1a48f70177d5cd
parent28b2bb706534bc641f475dbc3e5cf32b9f39fb8c
Fixing memory read after free in CanvasRenderingContext2D::accessFont

https://bugs.webkit.org/show_bug.cgi?id=106244

Reviewed by Abhishek Arya.

Using a temporary String object to hold ref count on string that is
passed by reference in CanvasRenderingContext2D::accessFont.

Test: fast/canvas/canvas-measureText.html

* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::accessFont):

Change-Id: Icfab9c7b7e870af9ca9ba05a1b803b51a9a329ad
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Source/WebCore/ChangeLog
Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp