Page 1 of 1

A potential problem in libfpx - \0-termination

Posted: 2012-10-04T21:24:55-07:00
by mi
The original patch is from Andriy Gapon. It is now part of the FreeBSD port graphics/libfpx.

Code: Select all

--- fpx/f_fpxvw.cpp     2005-02-25 21:23:05.000000000 -0500
+++ fpx/f_fpxvw.cpp     2012-01-19 19:44:34.425688599 +0200
@@ -613,6 +613,7 @@ HRESULT OleRegGetUserType(REFCLSID clsid
     const OLECHAR *src=OLESTR("Flashpix Toolkit Application");
     OLECHAR *dest=*pszUserType;
     while(*src) *dest++=*src++;
+    *dest=(OLECHAR)0;

     return S_OK;
 }