Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 666326

Summary: app-crypt/tpm-emulator-0.7.5 : /.../tpmd_dev.c:88:3: error: strncpy specified bound 108 equals destination size [-Werror=stringop-truncation]
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Crypto team [DISABLED] <crypto+disabled>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge-info.txt
app-crypt:tpm-emulator-0.7.5:20180916-070904.log
emerge-history.txt
environment
etc.portage.tbz2

Description Toralf Förster gentoo-dev 2018-09-16 07:44:13 UTC
In function ‘tpmd_connect’,
    inlined from ‘tpm_open’ at /var/tmp/portage/app-crypt/tpm-emulator-0.7.5/work/tpm-emulator-0.7.5/tpmd_dev/linux/tpmd_dev.c:143:9:
/var/tmp/portage/app-crypt/tpm-emulator-0.7.5/work/tpm-emulator-0.7.5/tpmd_dev/linux/tpmd_dev.c:88:3: error: ‘strncpy’ specified bound 108 equals destination size [-Werror=stringop-truncation]
   strncpy(addr.sun_path, socket_name, sizeof(addr.sun_path));
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.0_libressl_20180913-200915

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-8.2.0 *

Available Python interpreters, in order of preference:
  [1]   python3.7
  [2]   python3.6
  [3]   python2.7 (fallback)
Available Ruby profiles:
  [1]   ruby23 (with Rubygems) *



emerge -qpv app-crypt/tpm-emulator
[ebuild  N    ] app-crypt/tpm-emulator-0.7.5  USE="libressl modules ssl -mtm-emulator"
Comment 1 Toralf Förster gentoo-dev 2018-09-16 07:44:16 UTC
Created attachment 547018 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2018-09-16 07:44:19 UTC
Created attachment 547020 [details]
app-crypt:tpm-emulator-0.7.5:20180916-070904.log
Comment 3 Toralf Förster gentoo-dev 2018-09-16 07:44:22 UTC
Created attachment 547022 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2018-09-16 07:44:25 UTC
Created attachment 547024 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2018-09-16 07:44:28 UTC
Created attachment 547026 [details]
etc.portage.tbz2
Comment 6 Larry the Git Cow gentoo-dev 2018-09-16 10:38:23 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=96278bd867bd974b6200863215ec5aec3d31503a

commit 96278bd867bd974b6200863215ec5aec3d31503a
Author:     Alon Bar-Lev <alonbl@gentoo.org>
AuthorDate: 2018-09-16 10:35:46 +0000
Commit:     Alon Bar-Lev <alonbl@gentoo.org>
CommitDate: 2018-09-16 10:38:13 +0000

    app-crypt/tpm-emulator: fix strncpy build
    
    Closes: https://bugs.gentoo.org/show_bug.cgi?id=666326
    Thanks: Toralf Förster

 .../files/tpm-emulator-0.7.5-build.patch           | 33 ++++++++++++++++++++++
 app-crypt/tpm-emulator/tpm-emulator-0.7.5.ebuild   |  4 +++
 2 files changed, 37 insertions(+)