Date: prev next · Thread: first prev next last
2010 Archives by date, by thread · List index


Hello,

I can't test this patch since this part of code is for Windows but i think it's a true positive
Is this ok or am I wrong ?

diff --git a/hwpfilter/source/htags.cpp b/hwpfilter/source/htags.cpp
index 8235bf0..dd57638 100644
--- a/hwpfilter/source/htags.cpp
+++ b/hwpfilter/source/htags.cpp
@@ -146,8 +146,10 @@ bool OlePicture::Read(HWPFile & hwpf)
      char tname[200];
      wchar_t wtname[200];
      tmpnam(tname);
-     if (0 == (fp = fopen(tname, "wb")))
+     if (0 == (fp = fopen(tname, "wb"))) {
+          delete [] data;
           return false;
+     }
      fwrite(data, size, 1, fp);
      fclose(fp);
      MultiByteToWideChar(CP_ACP, 0, tname, -1, wtname, 200);

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.