* updated kmousetool (21.12.1 -> 21.12.2), untested
[t2-trunk.git] / package / multimedia / id3lib / CVE-2007-4460.patch
bloba554dd5e066e8f9f4bdbb214e4c908e51fb737a0
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
3 #
4 # T2 SDE: package/.../id3lib/CVE-2007-4460.patch
5 # Copyright (C) 2007 The T2 SDE Project
6 #
7 # More information can be found in the files COPYING and README.
8 #
9 # This patch file is dual-licensed. It is available under the license the
10 # patched project is licensed under, as long as it is an OpenSource license
11 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
12 # of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at your option) any later
14 # version.
15 # --- T2-COPYRIGHT-NOTE-END ---
17 diff -Nur id3lib-3.8.3-orig/src/tag_file.cpp id3lib-3.8.3/src/tag_file.cpp
18 --- id3lib-3.8.3-orig/src/tag_file.cpp 2007-11-04 16:22:35.000000000 +0000
19 +++ id3lib-3.8.3/src/tag_file.cpp 2007-11-04 16:23:11.000000000 +0000
20 @@ -242,8 +242,8 @@
21 strcpy(sTempFile, filename.c_str());
22 strcat(sTempFile, sTmpSuffix.c_str());
24 -#if ((defined(__GNUC__) && __GNUC__ >= 3 ) || !defined(HAVE_MKSTEMP))
25 - // This section is for Windows folk && gcc 3.x folk
26 +#if !defined(HAVE_MKSTEMP)
27 + // This section is for Windows folk
28 fstream tmpOut;
29 createFile(sTempFile, tmpOut);
31 @@ -257,7 +257,7 @@
32 tmpOut.write((char *)tmpBuffer, nBytes);
35 -#else //((defined(__GNUC__) && __GNUC__ >= 3 ) || !defined(HAVE_MKSTEMP))
36 +#else //!defined(HAVE_MKSTEMP)
38 // else we gotta make a temp file, copy the tag into it, copy the
39 // rest of the old file after the tag, delete the old file, rename
40 @@ -270,7 +270,7 @@
41 //ID3_THROW_DESC(ID3E_NoFile, "couldn't open temp file");
44 - ofstream tmpOut(fd);
45 + ofstream tmpOut(sTempFile);
46 if (!tmpOut)
48 tmpOut.close();
49 @@ -285,14 +285,14 @@
50 uchar tmpBuffer[BUFSIZ];
51 while (file)
53 - file.read(tmpBuffer, BUFSIZ);
54 + file.read((char *)tmpBuffer, BUFSIZ);
55 size_t nBytes = file.gcount();
56 - tmpOut.write(tmpBuffer, nBytes);
57 + tmpOut.write((char *)tmpBuffer, nBytes);
60 close(fd); //closes the file
62 -#endif ////((defined(__GNUC__) && __GNUC__ >= 3 ) || !defined(HAVE_MKSTEMP))
63 +#endif ////!defined(HAVE_MKSTEMP)
65 tmpOut.close();
66 file.close();