diff options
-rw-r--r-- | debian/changelog | 47 | ||||
-rw-r--r-- | debian/patches/0135-replace_gets.patch | 19 |
2 files changed, 30 insertions, 36 deletions
diff --git a/debian/changelog b/debian/changelog index 97ab1ef..c6489b0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,7 @@ xbase64 (3.1.2-9) unstable; urgency=medium * New debian/patches/0135-replace_gets.patch: - - Replace removed gets function with readline to fix FTBFS - (Closes: #841626). + - Replace deprecated gets() with std::cin.getline() (Closes: #841626). -- Jörg Frings-Fürst <debian@jff-webhosting.net> Sat, 22 Oct 2016 12:47:33 +0200 @@ -14,27 +13,27 @@ xbase64 (3.1.2-8) unstable; urgency=medium xbase64 (3.1.2-7) unstable; urgency=medium - * New debian/patches/0125-gcc6.patch for gcc-6 compatibility - (Closes: #811846). - Thanks to Pino Toscano <pino@debian.org>. - * debian/control: - - Change Vcs-* to secure uri. - - Bump Standards-Version to 3.9.8 (no changes required). - - Change debhelper version to >= 10. - - Add missing libxbase64-doc to Depends for libxbase64-[1|bin|dev]. - * debian/copyright: - - Add year 2016 to debian/*. - * debian/rules: - - Simplify override_dh_auto_configure. - - Remove override_dh_installdocs to fix FTBFS. - * debian/watch: - - Bump version to 4 (No changes required). - * Bump compat level to 10. - * Use dpkg-maintscript-helper dir_to_symlink at debian/*.postinst. - * Remove useless debian/libxbase64-doc.lintian-overrides. - * Remove useless debian(libxbase64-1.dirs. - * Renumbering debian/patches/*. - * Add symbols files for all architectures. + * debian/patches: + - Add patch to fix incorrect use of std::cout (Closes: #811846). + Thanks to Pino Toscano <pino@debian.org>. + - Renumber patches. + * debian/control: + - Change Vcs-* to secure URI. + - Bump Standards-Version to 3.9.8 (no changes required). + - Change debhelper version build dependency to >= 10. + - Add missing libxbase64-doc to Depends for libxbase64-[1|bin|dev]. + * debian/copyright: + - Add year 2016 for debian/*. + * debian/rules: + - Simplify override_dh_auto_configure. + - Remove override_dh_installdocs to fix FTBFS. + * debian/watch: + - Bump version to 4 (no changes required). + * Bump compat level to 10. + * Use dpkg-maintscript-helper dir_to_symlink in debian/*.postinst. + * Remove useless debian/libxbase64-doc.lintian-overrides. + * Remove useless debian(libxbase64-1.dirs. + * Add symbols files for all architectures. -- Jörg Frings-Fürst <debian@jff-webhosting.net> Tue, 20 Sep 2016 06:00:07 +0200 @@ -60,7 +59,7 @@ xbase64 (3.1.2-5) unstable; urgency=low - Rewrite Depends. * New debian/patches/0500-ReproducibleBuilds.patch: - Remove timestamps from doxygen generated files. - * Renumbering debian/patches/*. + * Renumber debian/patches/*. -- Jörg Frings-Fürst <debian@jff-webhosting.net> Tue, 17 Feb 2015 14:15:14 +0100 diff --git a/debian/patches/0135-replace_gets.patch b/debian/patches/0135-replace_gets.patch index 36b990d..26b21ec 100644 --- a/debian/patches/0135-replace_gets.patch +++ b/debian/patches/0135-replace_gets.patch @@ -1,13 +1,13 @@ -Description: Replace gets with readline +Description: Replace deprecated gets() with std::cin.getline() Author: Jörg Frings-Fürst <debian@jff-webhosting.net> Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=841626 Last-Update: 2016-10-22 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ -Index: trunk/bin/dbfutil1.cpp +Index: xbase64-3.1.2/bin/dbfutil1.cpp =================================================================== ---- trunk.orig/bin/dbfutil1.cpp -+++ trunk/bin/dbfutil1.cpp +--- xbase64-3.1.2.orig/bin/dbfutil1.cpp ++++ xbase64-3.1.2/bin/dbfutil1.cpp @@ -38,6 +38,7 @@ */ @@ -16,14 +16,12 @@ Index: trunk/bin/dbfutil1.cpp // next lines are helpful for debugging purposes /* -@@ -153,11 +154,18 @@ void MyClass::FilterMenu() +@@ -153,11 +154,16 @@ void MyClass::FilterMenu() /************************************************************************/ void MyClass::SetFilter() { - char Expression[512]; - memset( Expression, 0x00, 512 ); -+ /* replace getc with getline */ -+ + constexpr int SIZE = 512; + + char Expression[SIZE]; @@ -31,20 +29,18 @@ Index: trunk/bin/dbfutil1.cpp while( !strlen( Expression )){ std::cout << "Enter filter expression (like AMOUNT<5)" << std::endl; - gets( Expression ); -+/* gets( Expression );*/ ++ + std::cin.getline(Expression, SIZE-1); + Expression[SIZE-1] = '\0'; + std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n'); } if( xbf ) delete xbf; -@@ -235,19 +243,27 @@ void MyClass::LastFilterRec() +@@ -235,19 +241,24 @@ void MyClass::LastFilterRec() #ifdef XB_EXPRESSIONS void MyClass::ProcessExpression() { - char exprsn[256]; -+ /* replace getc with getline */ -+ + constexpr int SIZE = 256; + + char exprsn[SIZE]; @@ -61,7 +57,6 @@ Index: trunk/bin/dbfutil1.cpp std::cout << ">"; - gets( exprsn ); -+/* gets( exprsn ); */ + + std::cin.getline(exprsn, SIZE-1); + exprsn[SIZE-1] = '\0'; |