diff options
author | Graham Inggs <ginggs@debian.org> | 2018-02-17 20:22:10 +0200 |
---|---|---|
committer | Graham Inggs <ginggs@debian.org> | 2018-02-17 20:22:10 +0200 |
commit | d2ea8b4af31d78f7337b5010373e29a5ee58a223 (patch) | |
tree | fcb1d0fdaa8ac83e99db53b71e9abec140b79e32 | |
parent | fc2f6225822b180eb2714cc9cc7d1933adedb223 (diff) | |
download | debian_htop-d2ea8b4af31d78f7337b5010373e29a5ee58a223.tar.gz debian_htop-d2ea8b4af31d78f7337b5010373e29a5ee58a223.tar.bz2 debian_htop-d2ea8b4af31d78f7337b5010373e29a5ee58a223.zip |
Handle unexpected values for character passed to isalnum
-rw-r--r-- | debian/changelog | 1 | ||||
-rw-r--r-- | debian/patches/fix-isalnum-crash.patch | 18 | ||||
-rw-r--r-- | debian/patches/series | 1 |
3 files changed, 20 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index a9ab1be..f798a80 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,7 @@ htop (2.1.0-3) UNRELEASED; urgency=medium * Refresh debian/patches/601-openvz-new-ctid-vpid.patch * Fix issue with small terminals (Closes: #889693) * Fix preservation of LDFLAGS value during configure script + * Handle unexpected values for character passed to isalnum -- Graham Inggs <ginggs@debian.org> Mon, 05 Feb 2018 18:07:57 +0000 diff --git a/debian/patches/fix-isalnum-crash.patch b/debian/patches/fix-isalnum-crash.patch new file mode 100644 index 0000000..c74cab7 --- /dev/null +++ b/debian/patches/fix-isalnum-crash.patch @@ -0,0 +1,18 @@ +Description: Handle unexpected values for character passed to isalnum +Bug: https://github.com/hishamhm/htop/issues/711 +Origin: upstream,https://github.com/hishamhm/htop/commit/03f17688ada3800bdd344ec4397f81289977b153 +Author: Hisham Muhammad <hisham@gobolinux.org> +Last-Update: 2018-02-05 + +--- a/Panel.c ++++ b/Panel.c +@@ -469,7 +469,7 @@ HandlerResult Panel_selectByTyping(Panel* this, int ch) { + this->eventHandlerState = xCalloc(100, sizeof(char)); + char* buffer = this->eventHandlerState; + +- if (ch < 255 && isalnum(ch)) { ++ if (ch > 0 && ch < 255 && isalnum(ch)) { + int len = strlen(buffer); + if (len < 99) { + buffer[len] = ch; + diff --git a/debian/patches/series b/debian/patches/series index 2320e6a..a9f7fd9 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ 601-openvz-new-ctid-vpid.patch fix-small-terminals.patch fix-ldflags.patch +fix-isalnum-crash.patch |