From 451758c0c1497a56a5132c62b6c1b532b143e3d9 Mon Sep 17 00:00:00 2001 From: Martin Dvorak Date: Sun, 19 Mar 2023 19:00:24 +0100 Subject: [PATCH] Adding --is-tiocsti parameter (injects in prompt, which is undesired), updating year to 2023, removing WIP defines for TIOCSTI debugging #478 --- .gitignore | 1 + Changelog | 5 ++ PKGBUILD | 2 +- SECURITY.md | 17 +++--- build/anigif-build.sh | 2 +- build/anigif-create.sh | 2 +- build/anigif-rename.sh | 2 +- .../update-pkgconfig-sha256-on-repo-change.sh | 2 +- build/debian/aptly-add-deb.sh | 2 +- build/debian/make-deb.sh | 6 +-- build/debian/upload-to-mentors.sh | 2 +- build/fedora/rpm-from-deb.sh | 4 +- build/tarball/tarball-automake.sh | 2 +- build/tarball/tarball-build.sh | 4 +- build/tarball/tarball-uninstall.sh | 2 +- build/test-clean.sh | 2 +- build/test-gdb.sh | 2 +- build/test-generate-unity-test-runner.sh | 2 +- build/test-memleaks.sh | 2 +- build/test-set-env-monster-history.sh | 2 +- build/test-set-env-utf8-history.sh | 2 +- build/test-units.sh | 2 +- build/travis-ci/.travis.yml | 2 +- build/ubuntu/launchpad-add-hstr-ppa.sh | 2 +- build/ubuntu/launchpad-make-all-releases.sh | 6 +-- build/ubuntu/pbuilder-add-new-distro.sh | 2 +- build/ubuntu/pbuilder-refresh-all-distros.sh | 2 +- configure.ac | 4 +- etc/bash-completion.d/hstr | 2 +- hstr.pro | 7 +-- pad.xml | 10 ++-- snap/snapcraft.yaml | 2 +- src/hashset.c | 2 +- src/hstr.c | 23 ++++++-- src/hstr_blacklist.c | 2 +- src/hstr_curses.c | 2 +- src/hstr_favorites.c | 2 +- src/hstr_history.c | 8 +-- src/hstr_regexp.c | 2 +- src/hstr_utils.c | 52 ++++++++++++++++--- src/include/hashset.h | 2 +- src/include/hstr.h | 2 +- src/include/hstr_blacklist.h | 2 +- src/include/hstr_curses.h | 2 +- src/include/hstr_favorites.h | 2 +- src/include/hstr_history.h | 2 +- src/include/hstr_regexp.h | 2 +- src/include/hstr_utils.h | 47 ++++++++++++++++- src/include/radixsort.h | 2 +- src/main.c | 2 +- src/radixsort.c | 2 +- test/hstr-unit-tests.pro | 2 +- test/src/test.c | 2 +- test/src/test_curses_keyb.c | 2 +- test/src/test_history_generator.c | 2 +- test/src/test_keyb.c | 2 +- test/src/test_utf8.c | 2 +- test/test-bug-124.sh | 2 +- test/test-bug-163.sh | 2 +- test/test-bug-175.sh | 2 +- test/test-bug-176.sh | 2 +- test/test-bug-228.sh | 2 +- test/test-curses-keyb.sh | 2 +- test/test-history-generator.sh | 2 +- test/test-keyb.sh | 2 +- test/test-utf8.sh | 2 +- 66 files changed, 199 insertions(+), 99 deletions(-) diff --git a/.gitignore b/.gitignore index c8d256d..e79c8fb 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ /src/hstr /src/hh .deps/ +.vscode Makefile Makefile.in *.o diff --git a/Changelog b/Changelog index 815abdf..e35df19 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,8 @@ +2023-03-19 Martin Dvorak + + * Released v2.7.0 - important fix release ensuring that HSTR will work + on operating systems and Linux kernels without TIOCSTI support. + 2022-12-11 Martin Dvorak * Released v2.6.0 - fix release (several memory leak and overflow fixes, diff --git a/PKGBUILD b/PKGBUILD index 29cd778..84c915d 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -4,7 +4,7 @@ # Contributor: Busindre pkgname=hstr -pkgver=2.6 +pkgver=2.7 pkgrel=1 pkgdesc="A command line utility that brings improved BASH command completion from the history. It aims to make completion easier and more efficient than Ctrl-r." arch=('x86_64' diff --git a/SECURITY.md b/SECURITY.md index ecb0c88..3db6499 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -4,18 +4,19 @@ The following HSTR versions are currently being supported with security updates. -| Version | Supported | -| ------- | ------------------ | -| 2.6.0 | :white_check_mark: | -| 2.5.0 | :white_check_mark: | -| 2.4.0 | :white_check_mark: | -| <= 2.3.0 | :x: | +| Version | Supported | +| -------- | ------------------ | +| 2.7.0 | :white_check_mark: | +| 2.6.0 | :white_check_mark: | +| 2.5.0 | :white_check_mark: | +| 2.4.0 | :white_check_mark: | +| <= 2.3.0 | :x: | ## Reporting a Vulnerability -Please report HSTR vulnerabilities to +Please report HSTR vulnerabilities to [martin.dvorak@mindforger.com](martin.dvorak@mindforger.com) All reported vulnerabilities will be examined, reproduced and -expected fix release and release date will be shared with +expected fix release and release date will be shared with the reporter. diff --git a/build/anigif-build.sh b/build/anigif-build.sh index 17c7e17..d6ee795 100755 --- a/build/anigif-build.sh +++ b/build/anigif-build.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2014-2022 Martin Dvorak +# Copyright (C) 2014-2023 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/anigif-create.sh b/build/anigif-create.sh index 968eccb..f14083f 100755 --- a/build/anigif-create.sh +++ b/build/anigif-create.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2014-2022 Martin Dvorak +# Copyright (C) 2014-2023 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/anigif-rename.sh b/build/anigif-rename.sh index ac0ecbb..3eb0fe9 100755 --- a/build/anigif-rename.sh +++ b/build/anigif-rename.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2014-2022 Martin Dvorak +# Copyright (C) 2014-2023 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/arch/update-pkgconfig-sha256-on-repo-change.sh b/build/arch/update-pkgconfig-sha256-on-repo-change.sh index 4047160..2a74283 100755 --- a/build/arch/update-pkgconfig-sha256-on-repo-change.sh +++ b/build/arch/update-pkgconfig-sha256-on-repo-change.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2014-2022 Martin Dvorak +# Copyright (C) 2014-2023 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/debian/aptly-add-deb.sh b/build/debian/aptly-add-deb.sh index 4748fa2..3c5c97e 100755 --- a/build/debian/aptly-add-deb.sh +++ b/build/debian/aptly-add-deb.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2016-2022 Martin Dvorak +# Copyright (C) 2016-2023 Martin Dvorak # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License diff --git a/build/debian/make-deb.sh b/build/debian/make-deb.sh index 4ff3b0e..bd5345b 100755 --- a/build/debian/make-deb.sh +++ b/build/debian/make-deb.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2014-2022 Martin Dvorak +# Copyright (C) 2014-2023 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -147,8 +147,8 @@ then exit 1 fi -export ARG_BAZAAR_MSG="HSTR 2.6.0" -export ARG_VERSION="2.6.0" +export ARG_BAZAAR_MSG="HSTR 2.7.0" +export ARG_VERSION="2.7.0" # Debian releases: https://www.debian.org/releases/ # 6/7/8/9/10: squeeze wheezy jessie stretch buster diff --git a/build/debian/upload-to-mentors.sh b/build/debian/upload-to-mentors.sh index e36e61a..3903046 100755 --- a/build/debian/upload-to-mentors.sh +++ b/build/debian/upload-to-mentors.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2014-2022 Martin Dvorak +# Copyright (C) 2014-2023 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/fedora/rpm-from-deb.sh b/build/fedora/rpm-from-deb.sh index dedb77b..6e66f5c 100755 --- a/build/fedora/rpm-from-deb.sh +++ b/build/fedora/rpm-from-deb.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2014-2022 Martin Dvorak +# Copyright (C) 2014-2023 Martin Dvorak # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -20,7 +20,7 @@ # This script is available from http://www.mindforger.com/fedora/fedora-rpm-from-deb.sh # to be easily available in VMs -export MFVERSION="2.6.0" +export MFVERSION="2.7.0" export MFPRJNAME="hstr-${MFVERSION}" export AMD64NAME="hstr_${MFVERSION}-1_amd64" export I386NAME="hstr_${MFVERSION}-1_i386" diff --git a/build/tarball/tarball-automake.sh b/build/tarball/tarball-automake.sh index a66218a..cd5d613 100755 --- a/build/tarball/tarball-automake.sh +++ b/build/tarball/tarball-automake.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2014-2022 Martin Dvorak +# Copyright (C) 2014-2023 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/tarball/tarball-build.sh b/build/tarball/tarball-build.sh index 518be56..b6f624e 100755 --- a/build/tarball/tarball-build.sh +++ b/build/tarball/tarball-build.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2014-2022 Martin Dvorak +# Copyright (C) 2014-2023 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -20,7 +20,7 @@ export SCRIPT_HOME=`pwd` -export HSTR_VERSION="2.6.0" +export HSTR_VERSION="2.7.0" export NOW=`date +%Y-%m-%d--%H-%M-%S` export GH_RELEASE_DIR=~/p/hstr/release diff --git a/build/tarball/tarball-uninstall.sh b/build/tarball/tarball-uninstall.sh index 930cfab..a4e248b 100755 --- a/build/tarball/tarball-uninstall.sh +++ b/build/tarball/tarball-uninstall.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2014-2022 Martin Dvorak +# Copyright (C) 2014-2023 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/test-clean.sh b/build/test-clean.sh index 73b80bd..16d9a69 100755 --- a/build/test-clean.sh +++ b/build/test-clean.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2014-2022 Martin Dvorak +# Copyright (C) 2014-2023 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/test-gdb.sh b/build/test-gdb.sh index f61657c..fffe7f6 100755 --- a/build/test-gdb.sh +++ b/build/test-gdb.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2014-2022 Martin Dvorak +# Copyright (C) 2014-2023 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/test-generate-unity-test-runner.sh b/build/test-generate-unity-test-runner.sh index d2541c3..bc380a8 100755 --- a/build/test-generate-unity-test-runner.sh +++ b/build/test-generate-unity-test-runner.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2014-2022 Martin Dvorak +# Copyright (C) 2014-2023 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/test-memleaks.sh b/build/test-memleaks.sh index 76df7e0..f2a2518 100755 --- a/build/test-memleaks.sh +++ b/build/test-memleaks.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2014-2022 Martin Dvorak +# Copyright (C) 2014-2023 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/test-set-env-monster-history.sh b/build/test-set-env-monster-history.sh index fc7ebbf..1fc7dcd 100755 --- a/build/test-set-env-monster-history.sh +++ b/build/test-set-env-monster-history.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2014-2022 Martin Dvorak +# Copyright (C) 2014-2023 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/test-set-env-utf8-history.sh b/build/test-set-env-utf8-history.sh index 4dfd3b5..6fd020b 100755 --- a/build/test-set-env-utf8-history.sh +++ b/build/test-set-env-utf8-history.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2014-2022 Martin Dvorak +# Copyright (C) 2014-2023 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/test-units.sh b/build/test-units.sh index cf02c8d..d9180a2 100755 --- a/build/test-units.sh +++ b/build/test-units.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2014-2022 Martin Dvorak +# Copyright (C) 2014-2023 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/travis-ci/.travis.yml b/build/travis-ci/.travis.yml index a2d5b87..58c2307 100644 --- a/build/travis-ci/.travis.yml +++ b/build/travis-ci/.travis.yml @@ -1,6 +1,6 @@ # .travis.yml Travis CI configuration file for HSTR # -# Copyright (C) 2014-2022 Martin Dvorak +# Copyright (C) 2014-2023 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/ubuntu/launchpad-add-hstr-ppa.sh b/build/ubuntu/launchpad-add-hstr-ppa.sh index 452db2b..ccbe186 100755 --- a/build/ubuntu/launchpad-add-hstr-ppa.sh +++ b/build/ubuntu/launchpad-add-hstr-ppa.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2014-2022 Martin Dvorak +# Copyright (C) 2014-2023 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/ubuntu/launchpad-make-all-releases.sh b/build/ubuntu/launchpad-make-all-releases.sh index e83fa20..9aeaf87 100755 --- a/build/ubuntu/launchpad-make-all-releases.sh +++ b/build/ubuntu/launchpad-make-all-releases.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2014-2022 Martin Dvorak +# Copyright (C) 2014-2023 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -163,8 +163,8 @@ then exit 1 fi -export ARG_BAZAAR_MSG="Release 2.6" -export ARG_MAJOR_VERSION=2.6. +export ARG_BAZAAR_MSG="Release 2.7" +export ARG_MAJOR_VERSION=2.7. export ARG_MINOR_VERSION=1 # minor version is incremented for every Ubuntu version # https://wiki.ubuntu.com/Releases diff --git a/build/ubuntu/pbuilder-add-new-distro.sh b/build/ubuntu/pbuilder-add-new-distro.sh index a969663..dde6442 100755 --- a/build/ubuntu/pbuilder-add-new-distro.sh +++ b/build/ubuntu/pbuilder-add-new-distro.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2014-2022 Martin Dvorak +# Copyright (C) 2014-2023 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/ubuntu/pbuilder-refresh-all-distros.sh b/build/ubuntu/pbuilder-refresh-all-distros.sh index 5b55854..7416298 100755 --- a/build/ubuntu/pbuilder-refresh-all-distros.sh +++ b/build/ubuntu/pbuilder-refresh-all-distros.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2014-2022 Martin Dvorak +# Copyright (C) 2014-2023 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/configure.ac b/configure.ac index e7d2ea6..d4e92a0 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ # configure.ac Autoconf configuration file # -# Copyright (C) 2014-2022 Martin Dvorak +# Copyright (C) 2014-2023 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -20,7 +20,7 @@ AC_PREREQ([2.69]) -AC_INIT(hstr, 2.6.0, martin.dvorak@mindforger.com) +AC_INIT(hstr, 2.7.0, martin.dvorak@mindforger.com) AC_CONFIG_FILES([Makefile src/Makefile man/Makefile]) # Check src dir existence. diff --git a/etc/bash-completion.d/hstr b/etc/bash-completion.d/hstr index 0ec1d6d..44ed31d 100755 --- a/etc/bash-completion.d/hstr +++ b/etc/bash-completion.d/hstr @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2014-2022 Martin Dvorak +# Copyright (C) 2014-2023 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hstr.pro b/hstr.pro index 350c25a..3671d1e 100644 --- a/hstr.pro +++ b/hstr.pro @@ -1,6 +1,6 @@ -# hstr.pro Qt project file for HSTR shell history compleation utility +# hstr.pro Qt project file for HSTR shell history completion utility # -# Copyright (C) 2014-2022 Martin Dvorak +# Copyright (C) 2014-2023 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -61,6 +61,7 @@ hstrdebug { } QMAKE_LINK = gcc -DEFINES += LINUX_KERNEL_6 +# TIOCSTI debugging: +# DEFINES += __CYGWIN__ message(DEFINES of hstr.pro build: $$DEFINES) diff --git a/pad.xml b/pad.xml index 7ba3fac..fa577a4 100644 --- a/pad.xml +++ b/pad.xml @@ -2,7 +2,7 @@