Package Details: acct 6.6.4-1

Git Clone URL: https://aur.archlinux.org/acct.git (read-only, click to copy)
Package Base: acct
Description: Utilities for monitoring process activities
Upstream URL: https://www.gnu.org/software/acct
Licenses: GPL3
Conflicts: psacct
Provides: psacct
Submitter: sorin-mihai
Maintainer: sorin-mihai
Last Packager: sorin-mihai
Votes: 3
Popularity: 0.173457
First Submitted: 2018-12-22 23:58 (UTC)
Last Updated: 2018-12-22 23:58 (UTC)

Latest Comments

waschtl commented on 2024-12-06 16:52 (UTC) (edited on 2024-12-06 16:55 (UTC) by waschtl)

The execution of lastcomm and a couple other binaries results in buffer overflow when compiled with optimization enabled (-O):

 % sudo lastcomm                                                                                                                  
*** buffer overflow detected ***: terminated

This is true at least for all optimization levels I tested (-O2, -O1, and -Os). Appending -O0 to CFLAGS solved the situation for me:

diff --git a/PKGBUILD b/PKGBUILD
index b3c3010..d715d6a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -32,6 +32,7 @@ sha512sums=('413aa446caece8fd773c92e2995bbaa034f63dd0ced521815a676c49f118e029828
 validpgpkeys=('747774305F9DCC9504703CEFB73CBC7708FA8C10')      # Markus Gothe <nietzsche@lysator.liu.se>

 build() {
+  CFLAGS="$CFLAGS -O0"  # With optimization buffer overflows happen.
   cd "$srcdir/$pkgname-$pkgver"
   ./configure --prefix=/usr --sbindir=/usr/bin
   make