diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2019-09-01 00:00:32 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2019-09-01 00:00:32 +0200 |
commit | ca9627e70852f6b2e835660df870fe3ab405882d (patch) | |
tree | 0a008b1d5b16fa0679a195ed7b5662c7891f591c /media-libs/id3lib/files/id3lib-3.8.3-security.patch | |
download | darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.gz darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.bz2 darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.xz darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.zip |
Initial import
Diffstat (limited to 'media-libs/id3lib/files/id3lib-3.8.3-security.patch')
-rw-r--r-- | media-libs/id3lib/files/id3lib-3.8.3-security.patch | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/media-libs/id3lib/files/id3lib-3.8.3-security.patch b/media-libs/id3lib/files/id3lib-3.8.3-security.patch new file mode 100644 index 0000000..e56d32c --- /dev/null +++ b/media-libs/id3lib/files/id3lib-3.8.3-security.patch @@ -0,0 +1,50 @@ +diff -ur id3lib-3.8.3.orig/src/tag_file.cpp id3lib-3.8.3/src/tag_file.cpp +--- id3lib-3.8.3.orig/src/tag_file.cpp 2003-03-02 02:23:00.000000000 +0200 ++++ id3lib-3.8.3/src/tag_file.cpp 2007-08-20 19:40:16.000000000 +0300 +@@ -242,8 +242,8 @@ + strcpy(sTempFile, filename.c_str()); + strcat(sTempFile, sTmpSuffix.c_str()); + +-#if ((defined(__GNUC__) && __GNUC__ >= 3 ) || !defined(HAVE_MKSTEMP)) +- // This section is for Windows folk && gcc 3.x folk ++#if !defined(HAVE_MKSTEMP) ++ // This section is for Windows folk + fstream tmpOut; + createFile(sTempFile, tmpOut); + +@@ -257,7 +257,7 @@ + tmpOut.write((char *)tmpBuffer, nBytes); + } + +-#else //((defined(__GNUC__) && __GNUC__ >= 3 ) || !defined(HAVE_MKSTEMP)) ++#else //!defined(HAVE_MKSTEMP) + + // else we gotta make a temp file, copy the tag into it, copy the + // rest of the old file after the tag, delete the old file, rename +@@ -270,7 +270,7 @@ + //ID3_THROW_DESC(ID3E_NoFile, "couldn't open temp file"); + } + +- ofstream tmpOut(fd); ++ ofstream tmpOut(sTempFile); + if (!tmpOut) + { + tmpOut.close(); +@@ -285,14 +285,14 @@ + uchar tmpBuffer[BUFSIZ]; + while (file) + { +- file.read(tmpBuffer, BUFSIZ); ++ file.read((char *)tmpBuffer, BUFSIZ); + size_t nBytes = file.gcount(); +- tmpOut.write(tmpBuffer, nBytes); ++ tmpOut.write((char *)tmpBuffer, nBytes); + } + + close(fd); //closes the file + +-#endif ////((defined(__GNUC__) && __GNUC__ >= 3 ) || !defined(HAVE_MKSTEMP)) ++#endif ////!defined(HAVE_MKSTEMP) + + tmpOut.close(); + file.close(); |