$ sh bz678518.c
==543== Memcheck, a memory error detector
==543== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==543== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==543== Command: ./a.out
==543==
==543== Invalid read of size 4
==543== at 0x3EB8A056EB: idna_to_ascii_4z (idna.c:529)
==543== by 0x3EB8A05947: idna_to_ascii_8z (idna.c:582)
==543== by 0x3EB8A059A9: idna_to_ascii_lz (idna.c:614)
==543== by 0x400685: main (bz678518.c:15)
==543== Address 0x4c45fcc is 12 bytes inside a block of size 15 alloc'd
==543== at 0x4A08B1C: realloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==543== by 0x3EB8A05764: idna_to_ascii_4z (idna.c:530)
==543== by 0x3EB8A05947: idna_to_ascii_8z (idna.c:582)
==543== by 0x3EB8A059A9: idna_to_ascii_lz (idna.c:614)
==543== by 0x400685: main (bz678518.c:15)
==543==
www.xn--4cab6c.se
==543==
==543== HEAP SUMMARY:
==543== in use at exit: 18 bytes in 1 blocks
==543== total heap usage: 27 allocs, 26 frees, 35,129 bytes allocated
==543==
==543== LEAK SUMMARY:
==543== definitely lost: 18 bytes in 1 blocks
==543== indirectly lost: 0 bytes in 0 blocks
==543== possibly lost: 0 bytes in 0 blocks
==543== still reachable: 0 bytes in 0 blocks
==543== suppressed: 0 bytes in 0 blocks
==543== Rerun with --leak-check=full to see details of leaked memory
==543==
==543== For counts of detected and suppressed errors, rerun with: -v
==543== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
The bug still exists in Fedora 21:
$ rpm -q valgrind 3.10.1- 1.fc21. x86_64
valgrind-
$ curl -JO 'https:/ /bugzilla. redhat. com/attachment. cgi?id= 479480'
curl: Saved to filename 'bz678518.c'
$ sh bz678518.c valgrind/ vgpreload_ memcheck- amd64-linux. so)
==543== Memcheck, a memory error detector
==543== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==543== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==543== Command: ./a.out
==543==
==543== Invalid read of size 4
==543== at 0x3EB8A056EB: idna_to_ascii_4z (idna.c:529)
==543== by 0x3EB8A05947: idna_to_ascii_8z (idna.c:582)
==543== by 0x3EB8A059A9: idna_to_ascii_lz (idna.c:614)
==543== by 0x400685: main (bz678518.c:15)
==543== Address 0x4c45fcc is 12 bytes inside a block of size 15 alloc'd
==543== at 0x4A08B1C: realloc (in /usr/lib64/
==543== by 0x3EB8A05764: idna_to_ascii_4z (idna.c:530)
==543== by 0x3EB8A05947: idna_to_ascii_8z (idna.c:582)
==543== by 0x3EB8A059A9: idna_to_ascii_lz (idna.c:614)
==543== by 0x400685: main (bz678518.c:15)
==543==
www.xn--4cab6c.se
==543==
==543== HEAP SUMMARY:
==543== in use at exit: 18 bytes in 1 blocks
==543== total heap usage: 27 allocs, 26 frees, 35,129 bytes allocated
==543==
==543== LEAK SUMMARY:
==543== definitely lost: 18 bytes in 1 blocks
==543== indirectly lost: 0 bytes in 0 blocks
==543== possibly lost: 0 bytes in 0 blocks
==543== still reachable: 0 bytes in 0 blocks
==543== suppressed: 0 bytes in 0 blocks
==543== Rerun with --leak-check=full to see details of leaked memory
==543==
==543== For counts of detected and suppressed errors, rerun with: -v
==543== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)