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 /sys-apps/util-linux/files/util-linux-2.12q-debian-10cfdisk.patch | |
download | darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.gz darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.bz2 darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.xz darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.zip |
Initial import
Diffstat (limited to 'sys-apps/util-linux/files/util-linux-2.12q-debian-10cfdisk.patch')
-rw-r--r-- | sys-apps/util-linux/files/util-linux-2.12q-debian-10cfdisk.patch | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/sys-apps/util-linux/files/util-linux-2.12q-debian-10cfdisk.patch b/sys-apps/util-linux/files/util-linux-2.12q-debian-10cfdisk.patch new file mode 100644 index 0000000..6105fb1 --- /dev/null +++ b/sys-apps/util-linux/files/util-linux-2.12q-debian-10cfdisk.patch @@ -0,0 +1,49 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 10cfdisk.dpatch by LaMont Jones <lamont@debian.org> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Buffer overruns with narrow terminal windows. + +@DPATCH@ +diff -urNad util-linux/fdisk/cfdisk.c /tmp/dpep.rEB26p/util-linux/fdisk/cfdisk.c +--- util-linux/fdisk/cfdisk.c 2004-12-24 14:41:20.000000000 -0700 ++++ /tmp/dpep.rEB26p/util-linux/fdisk/cfdisk.c 2004-12-24 15:00:00.503453740 -0700 +@@ -2100,7 +2100,7 @@ + if (to_file) { + if ((fp = fopen(fname, "w")) == NULL) { + char errstr[LINE_LENGTH]; +- sprintf(errstr, _("Cannot open file '%s'"), fname); ++ snprintf(errstr, sizeof(errstr), _("Cannot open file '%s'"), fname); + print_warning(errstr); + return; + } +@@ -2184,7 +2184,7 @@ + if (to_file) { + if ((fp = fopen(fname, "w")) == NULL) { + char errstr[LINE_LENGTH]; +- sprintf(errstr, _("Cannot open file '%s'"), fname); ++ snprintf(errstr, sizeof(errstr), _("Cannot open file '%s'"), fname); + print_warning(errstr); + return; + } +@@ -2638,9 +2638,9 @@ + mvaddstr(WARNING_START, 0, line); + + +- sprintf(line, "cfdisk %s", VERSION); ++ snprintf(line, COLS+1, "cfdisk %s", VERSION); + mvaddstr(HEADER_START, (COLS-strlen(line))/2, line); +- sprintf(line, _("Disk Drive: %s"), disk_device); ++ snprintf(line, COLS+1, _("Disk Drive: %s"), disk_device); + mvaddstr(HEADER_START+2, (COLS-strlen(line))/2, line); + { + long long bytes = actual_size*(long long) SECTOR_SIZE; +@@ -2654,7 +2654,7 @@ + bytes, megabytes/K, (10*megabytes/K)%10); + } + mvaddstr(HEADER_START+3, (COLS-strlen(line))/2, line); +- sprintf(line, _("Heads: %d Sectors per Track: %d Cylinders: %lld"), ++ snprintf(line, COLS+1, _("Heads: %d Sectors per Track: %d Cylinders: %lld"), + heads, sectors, cylinders); + mvaddstr(HEADER_START+4, (COLS-strlen(line))/2, line); + |