This patch fixes an issues where temporary files were created in an insecure way. It was first intruduced in version 3.8.3-7 and fixes http://bugs.debian.org/438540 --- a/src/tag_file.cpp +++ b/src/tag_file.cpp @@ -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(); /log/gnu/packages/debian.scm'>
path: root/gnu/packages/debian.scm
AgeCommit message (Expand)Author
2020-08-29gnu: debianutils: Update to 4.11.1....* gnu/packages/debian.scm (debianutils): Update to 4.11.1. Tobias Geerinckx-Rice
2020-07-02gnu: Add debianutils....* gnu/packages/debian.scm (debianutils): New public variable. Marius Bakke
2020-06-26gnu: debootstrap: Wrap with gpg and wget in PATH....* gnu/packages/debian.scm (debootstrap)[inputs]: Add GNUPG and WGET. Marius Bakke
2020-05-01gnu: Add apt-mirror....* gnu/packages/debian.scm (apt-mirror): New variable. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Jean-Baptiste Note
2020-04-13gnu: debootstrap: Update to 1.0.123....* gnu/packages/debian.scm (debootstrap): Update to 1.0.123. Tobias Geerinckx-Rice
2020-03-02gnu: debootstrap: Update to 1.0.119....* gnu/packages/debian.scm (debootstrap): Update to 1.0.119. Signed-off-by: Efraim Flashner <efraim@flashner.co.il> Vincent Legoll
2020-02-23gnu: debootstrap: Update to 1.0.118...The attached patch has been tested by creating arm64, mipsel & amd64 chroots and the amd64 one has been actually run. -- Vincent Legoll From a23b962c21e20c72f425675e6ea6e11cd0f944d0 Mon Sep 17 00:00:00 2001 From: Vincent Legoll <vincent.legoll@gmail.com> Date: Fri, 21 Feb 2020 23:34:40 +0100 Subject: [PATCH] gnu: debootstrap: Update to 1.0.118. * gnu/packages/debian.scm (debootstrap): Update to 1.0.118. Signed-off-by: Efraim Flashner <efraim@flashner.co.il> Vincent Legoll