diff options
author | Narrat | 2023-09-08 00:15:34 +0200 |
---|---|---|
committer | Narrat | 2023-09-08 00:15:34 +0200 |
commit | 98b7b7321b4ecede87a869e7edcabe37cf31960d (patch) | |
tree | 54b754db734a0755eb321df121fe3a04ee94ef84 | |
parent | b6a420993b953c985654e578a6077f255490651d (diff) | |
download | aur-monica.tar.gz |
monica: add fix for missing string literals in fprintf usage
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | 01_missing-string-literal.patch | 36 | ||||
-rw-r--r-- | PKGBUILD | 12 |
3 files changed, 47 insertions, 6 deletions
@@ -1,7 +1,7 @@ pkgbase = monica pkgdesc = Monitor calibration tool pkgver = 3.7 - pkgrel = 6 + pkgrel = 7 url = https://sources.archlinux.org/other/monica/ arch = x86_64 license = BSD @@ -10,8 +10,9 @@ pkgbase = monica depends = xorg-xgamma source = https://sources.archlinux.org/other/monica/monica-3.7.tar.bz2 source = monica.png + source = 01_missing-string-literal.patch sha512sums = 87565f33f3c3492b196905e5b8e17bd45a7eb8eb0a0281f02e23337eec888af82571ac6f2d229256ee97012d402b7f1b217cd56a8b87ff9c9296931bf63cb153 sha512sums = 1a839c9481528dcb785011417a0b77d925b3ae373c6d5fd4a48bab89091c2508079988db38e9dd21e8ed6922c8178b5f3c05beec455deba94ad304b85b990670 + sha512sums = 526d6e10867fa2f38bb5bd79681e5caca1c5970992c78b9c08ec083034392654cda6f6fff9eefed02af4205fb8bcd3921179f4c16ad7c210e729c28f5a76fe84 pkgname = monica - diff --git a/01_missing-string-literal.patch b/01_missing-string-literal.patch new file mode 100644 index 000000000000..11bb3c8fdb9e --- /dev/null +++ b/01_missing-string-literal.patch @@ -0,0 +1,36 @@ +--- a/monica-3.7/monica.cpp ++++ b/monica-3.7/monica.cpp +@@ -1300,7 +1300,7 @@ + while (fgets (buffer, BUF_SIZE, f_r)) { + if (strstr(buffer, ". .monicarc")) {//skip old entries + continue; +- } else fprintf(f_w, buffer); ++ } else fprintf(f_w, "%s", buffer); + } + fprintf(f_w, ". .monicarc #monitor calibration"); + fclose(f_w); +@@ -1354,11 +1354,11 @@ + strcpy(mod_buffer, "#"); + strncat(mod_buffer, buffer, BUF_SIZE); + mod_buffer[BUF_SIZE + 1] = '\0'; +- fprintf(f_w, mod_buffer); ++ fprintf(f_w, "%s", mod_buffer); + } else if (strstr(buffer, "$HOME/.monicarc")) {//skip old entries of .monicarc + continue; +- } else fprintf(f_w, buffer); +- } else fprintf(f_w, buffer); ++ } else fprintf(f_w, "%s", buffer); ++ } else fprintf(f_w, "%s", buffer); + } + + fclose(f_w); +@@ -1394,7 +1394,7 @@ + if (strstr(buffer, str_to_remove.c_str())) { + continue; + } else { +- fprintf(f_w, buffer); ++ fprintf(f_w, "%s", buffer); + line_count += 1; + } + } + @@ -1,10 +1,10 @@ -# Maintainer: Alexander F Rødseth <rodseth@gmail.com> +# Contributor: Alexander F Rødseth <rodseth@gmail.com> # Contributor: tobias <tobias@archlinux.org> # Contributor: Tobias Kieslich <tobias@justdreams.de> pkgname=monica pkgver=3.7 -pkgrel=6 +pkgrel=7 pkgdesc='Monitor calibration tool' arch=('x86_64') url='https://sources.archlinux.org/other/monica/' @@ -12,15 +12,19 @@ license=('BSD') depends=('fltk' 'xorg-xgamma') makedepends=('gendesk') source=("https://sources.archlinux.org/other/monica/$pkgname-$pkgver.tar.bz2" - 'monica.png') + 'monica.png' + "01_missing-string-literal.patch") sha512sums=('87565f33f3c3492b196905e5b8e17bd45a7eb8eb0a0281f02e23337eec888af82571ac6f2d229256ee97012d402b7f1b217cd56a8b87ff9c9296931bf63cb153' - '1a839c9481528dcb785011417a0b77d925b3ae373c6d5fd4a48bab89091c2508079988db38e9dd21e8ed6922c8178b5f3c05beec455deba94ad304b85b990670') + '1a839c9481528dcb785011417a0b77d925b3ae373c6d5fd4a48bab89091c2508079988db38e9dd21e8ed6922c8178b5f3c05beec455deba94ad304b85b990670' + '526d6e10867fa2f38bb5bd79681e5caca1c5970992c78b9c08ec083034392654cda6f6fff9eefed02af4205fb8bcd3921179f4c16ad7c210e729c28f5a76fe84') prepare() { cd "$pkgname-$pkgver" gendesk -f -n --pkgname "$pkgname" --pkgdesc "$pkgdesc" \ --categories 'Application;Settings;System' + + patch -Np2 -i "$srcdir"/01_missing-string-literal.patch } build() { |