Bug#1041611: dmidecode --dump-bin segfaults

2023-07-21 Thread Jörg Frings-Fürst
forwarded 1041611 http://savannah.nongnu.org/bugs/index.php?64456
thanks

Hello Jan,


thank you for spending your time helping to make Debian better with this bug
report.

I have forward your bug to upstream.

CU
Jörg



-- 
New:
GPG Fingerprint: 63E0 075F C8D4 3ABB 35AB  30EE 09F8 9F3C 8CA1 D25D
GPG key (long) : 09F89F3C8CA1D25D
GPG Key: 8CA1D25D
CAcert Key S/N : 0E:D4:56


Jörg Frings-Fürst
D-54470 Lieser


git:  https://git.jff.email/cgit/

Skype:jff-skype@jff.email
Jami: joergfringsfuerst
Telegram: @joergfringsfuerst
Matrix:   @joergff:matrix.snct-gmbh.de

My wish list: 
 - Please send me a picture from the nature at your home.


Am Freitag, dem 21.07.2023 um 12:42 +0200 schrieb Jan Nordholz:
> Package: dmidecode
> Version: 3.5-1
> 
> Hi,
> 
> dmidecode --dump-bin segfaults on 64-bit architectures because  does
> not provide a declaration for fdopen() in ANSI mode, so the returned pointer
> is implicitly truncated to int:
> 
> [...]
> x86_64-linux-gnu-gcc -g -O2 -ffile-prefix-map=/tmp/dmidecode-3.5=. -fstack-
> protector-strong -Wformat -Werror=format-security -fPIE -Wdate-time -
> D_FORTIFY_SOURCE=2 -Os -ansi -c dmidecode.c -o dmidecode.o
> dmidecode.c: In function ‘dmi_table_dump’:
> dmidecode.c:5427:11: warning: assignment to ‘FILE *’ from ‘int’ makes pointer
> from integer without a cast [-Wint-conversion]
>  5427 | f = fdopen(fd, "wb");
>   |   ^
> [...]
> 
> Cheers,
> 
> Jan




signature.asc
Description: This is a digitally signed message part


Bug#1041611: dmidecode --dump-bin segfaults

2023-07-21 Thread Jan Nordholz
Package: dmidecode
Version: 3.5-1

Hi,

dmidecode --dump-bin segfaults on 64-bit architectures because  does
not provide a declaration for fdopen() in ANSI mode, so the returned pointer
is implicitly truncated to int:

[...]
x86_64-linux-gnu-gcc -g -O2 -ffile-prefix-map=/tmp/dmidecode-3.5=. 
-fstack-protector-strong -Wformat -Werror=format-security -fPIE -Wdate-time 
-D_FORTIFY_SOURCE=2 -Os -ansi -c dmidecode.c -o dmidecode.o
dmidecode.c: In function ‘dmi_table_dump’:
dmidecode.c:5427:11: warning: assignment to ‘FILE *’ from ‘int’ makes pointer 
from integer without a cast [-Wint-conversion]
 5427 | f = fdopen(fd, "wb");
  |   ^
[...]

Cheers,

Jan